The JB value calculator online is a tool that estimates the Jarque-Bera (JB) statistic, a test statistic used to check whether a dataset has skewness and kurtosis matching a normal distribution. You input a list of numbers, and the calculator returns the JB statistic and often a p-value, telling you whether the data can be considered normally distributed.
Formula
The Jarque-Bera statistic is defined as:
JB = (n/6) × (S² + (K − 3)² / 4)
- n = number of observations in the sample
- S = sample skewness (a measure of asymmetry)
- K = sample kurtosis (a measure of tailedness)
Under the null hypothesis of normality, JB follows a chi-squared distribution with 2 degrees of freedom. The p-value is the probability of observing a JB statistic at least as extreme as the one computed, assuming the data is normal. A small p-value (typically < 0.05) suggests the data is not normally distributed.
Worked Example
Let’s use the default data: 4, 7, 9, 12, 15, 18, 21, 24. First, compute the mean:
Mean = (4+7+9+12+15+18+21+24) / 8 = 110 / 8 = 13.75
Then compute the variance (sample variance, denominator n−1):
Variance = [(4−13.75)² + (7−13.75)² + … + (24−13.75)²] / 7 = (95.0625 + 45.5625 + 22.5625 + 3.0625 + 1.5625 + 18.0625 + 52.5625 + 105.0625) / 7 = 343.5 / 7 = 49.0714
Standard deviation = √49.0714 = 7.0051
Skewness (S) for a sample is calculated as: (n / ((n−1)(n−2))) × Σ((xᵢ − mean)³ / s³). For this data, S ≈ 0.0000 (the data is symmetric around the mean).
Kurtosis (K) is: [n(n+1) / ((n−1)(n−2)(n−3))] × Σ((xᵢ − mean)⁴ / s⁴) − [3(n−1)² / ((n−2)(n−3))]. For this data, K ≈ 1.754 (excess kurtosis would be K − 3 ≈ −1.246).
Plugging into the JB formula:
JB = (8/6) × (0² + (1.754 − 3)² / 4) = 1.3333 × (1.5525 / 4) = 1.3333 × 0.3881 = 0.5175
The p-value approximation (for small JB) is exp(−0.5 × 0.5175) ≈ 0.772. This large p-value suggests no evidence against normality.
Assumptions
- The test assumes the sample is independent and identically distributed.
- It is a large-sample test; for small samples (n < 30), the chi-squared approximation may be poor.
- The test is sensitive to outliers, which can inflate skewness and kurtosis.
- It only tests for symmetry and tail weight, not for other aspects of normality.
When to Use the JB Test
The Jarque-Bera test is commonly used in econometrics and finance to check whether regression residuals are normally distributed, which is an assumption for many statistical procedures. It is also used in quality control and any field where normality of data is a prerequisite for parametric tests.
Use it when you have a sample of continuous data and you want a quick, single-number check for normality. It complements graphical methods like Q-Q plots and histograms.
How to Read the Result
The output gives two numbers:
- JB statistic: The larger the value, the further the data’s skewness and kurtosis are from those of a normal distribution (which has S=0 and K=3).
- p-value: Compare this to your significance level (commonly 0.05). If p < 0.05, reject the null hypothesis of normality. If p > 0.05, you do not have enough evidence to say the data is non-normal.
Note: The p-value approximation used here (exp(−0.5×JB)) is a rough shortcut for small JB values. For precise p-values, use a chi-squared table or statistical software.
Common Mistakes and Misconceptions
- Using sample vs population formulas: The JB test uses sample skewness and kurtosis, which have slightly different formulas than population versions. Make sure your calculator uses the sample versions.
- Ignoring sample size: For small samples (n < 30), the JB test can be unreliable. It often fails to reject normality when the sample is small, even if the data is clearly non-normal.
- Misinterpreting p-value: A high p-value does not prove normality; it just means the test did not detect a significant departure. The test has low power against certain alternatives (like short-tailed distributions).
- Outliers: A single outlier can drastically change skewness and kurtosis, leading to a false rejection of normality. Always inspect your data visually.
Alternatives to the JB Test
If the JB test seems limited, consider these alternatives:
- Shapiro-Wilk test: Generally more powerful for small samples (n < 50).
- Kolmogorov-Smirnov test: Compares the empirical distribution to a theoretical normal distribution, but requires specifying parameters.
- Anderson-Darling test: Another goodness-of-fit test that gives more weight to the tails.
- Graphical methods: Q-Q plots, histograms, and boxplots are simple visual checks that often reveal issues the JB test misses.
Each method has its own assumptions and limitations; the JB test is a quick screening tool, not a definitive answer.
Frequently Asked Questions
What does a JB value of 0 mean?
A JB value of 0 occurs when skewness is 0 and kurtosis is exactly 3, which is the ideal for a normal distribution. In practice, you’ll rarely get exactly 0, but values close to 0 (with a high p-value) suggest the data is approximately normal.
Can I use the JB test for any sample size?
Technically yes, but it is only reliable for large samples (n > 30 or even n > 100). For small samples, the chi-squared approximation is poor, and the test tends to have low power, meaning it often fails to detect non-normality even when it exists.
What is the difference between skewness and kurtosis?
Skewness measures the asymmetry of the distribution. A positive skew means the right tail is longer; negative skew means the left tail is longer. Kurtosis measures the heaviness of the tails. A normal distribution has kurtosis of 3; excess kurtosis (kurtosis − 3) is often reported, where 0 indicates normal tails.
Why is my p-value so small?
A very small p-value (e.g., < 0.001) indicates strong evidence against normality. This often happens when the data has significant skewness or heavy tails. Check for outliers or consider transforming the data (e.g., log transformation) before further analysis.
Does the JB test work for ordinal or categorical data?
No. The JB test is designed for continuous data. For ordinal or categorical data, normality is not a relevant concept, and other tests (like chi-squared tests) are more appropriate.
Is the p-value approximation accurate?
The approximation exp(−0.5×JB) is a rough shortcut that works well for small JB values (i.e., when the data is close to normal). For larger JB values, it becomes inaccurate. For precise p-values, use statistical software or a chi-squared table with 2 degrees of freedom.
Related
Formula used
in list | Data values | 4, 7, 9, 12, 15, 18, 21, 24 | 0 out jb | Jarque-Bera statistic | - | (n/6) * (s^2 + ((k - 3)^2)/4) | 4 out p | p-value (approx.) | - | exp(-0.5 * jb) | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- How to Find the Continuous Decay Rate
- Total Constant of Decay: How to Calculate It0.000121 1/s
- How to Calculate Decay Constant0.000121 1/s
- Half Life GitHub: What It Is and How to Use It
- Decay Constant: How to Calculate It0.000121 1/s
- Half-Life Games in Order: Full Release Timeline