Jarque-Bera Statistic Calculator for Excel
Calculate the Jarque-Bera test for normality using your Excel data. Enter your dataset below to compute skewness, kurtosis, and the Jarque-Bera statistic.
Comprehensive Guide: Calculating Jarque-Bera Statistic in Excel
The Jarque-Bera test is a powerful statistical tool used to determine whether sample data has the skewness and kurtosis matching a normal distribution. This guide will walk you through the complete process of calculating the Jarque-Bera statistic in Excel, interpreting the results, and understanding its practical applications in financial modeling, risk management, and data analysis.
Understanding the Jarque-Bera Test
The Jarque-Bera test is based on two moments of the data distribution:
- Skewness – Measures the asymmetry of the data around the sample mean
- Kurtosis – Measures the “tailedness” of the data distribution
The test statistic is calculated as:
JB = n/6 × (S² + (K-3)²/4)
Where:
- n = sample size
- S = sample skewness
- K = sample kurtosis
Step-by-Step Calculation in Excel
Step 1: Prepare Your Data
Organize your data in a single column in Excel. Ensure there are no empty cells or non-numeric values in your dataset.
Example: Place your data in cells A1:A100
Step 2: Calculate Basic Statistics
Use these Excel functions:
- =COUNT(A1:A100) for sample size (n)
- =AVERAGE(A1:A100) for mean
- =STDEV.P(A1:A100) for standard deviation
Step 3: Calculate Skewness
Excel’s built-in skewness function:
=SKEW(A1:A100)
Note: This calculates the population skewness. For sample skewness, you may need to adjust the formula.
Step 4: Calculate Kurtosis
Use Excel’s kurtosis function:
=KURT(A1:A100)
Note: Excel calculates excess kurtosis (subtracts 3 from the result).
Step 5: Compute Jarque-Bera Statistic
Combine the results using the formula:
=COUNT(A1:A100)/6*(SKEW(A1:A100)^2 + (KURT(A1:A100)^2)/4)
Step 6: Determine p-value
Use the chi-square distribution:
=CHISQ.DIST.RT(JB_statistic, 2)
Where JB_statistic is your calculated value from Step 5
Interpreting the Results
The Jarque-Bera test has two degrees of freedom (for skewness and kurtosis). The null hypothesis is that the data is normally distributed. Interpretation rules:
| p-value | Decision | Interpretation |
|---|---|---|
| p > 0.05 | Fail to reject H₀ | Data appears normally distributed |
| p ≤ 0.05 | Reject H₀ | Data does NOT appear normally distributed |
| p ≤ 0.01 | Strongly reject H₀ | Strong evidence against normality |
Practical Example with Financial Data
Let’s examine daily returns for S&P 500 index (2010-2020) with 2,517 observations:
| Statistic | Value | Interpretation |
|---|---|---|
| Mean | 0.00042 | Near zero as expected for returns |
| Standard Deviation | 0.0102 | 1.02% daily volatility |
| Skewness | -0.382 | Negative skew (more extreme negative returns) |
| Kurtosis | 5.12 | Fat tails (leptokurtic distribution) |
| Jarque-Bera | 284.67 | Very high value |
| p-value | < 0.0001 | Strongly reject normality |
This analysis shows that financial returns typically deviate from normality, exhibiting negative skewness and fat tails – a phenomenon known as “stylized facts” in financial econometrics.
Common Mistakes to Avoid
- Small sample sizes: The Jarque-Bera test performs poorly with n < 50. For small samples, consider Shapiro-Wilk test instead.
- Outliers: Extreme values can disproportionately affect skewness and kurtosis calculations. Consider winsorizing your data.
- Excel version differences: Older Excel versions (pre-2010) may calculate kurtosis differently. Always verify your Excel version’s documentation.
- Population vs sample: Excel’s SKEW() and KURT() functions calculate population moments. For sample data, you may need to adjust the formulas.
- Non-numeric data: Ensure your dataset contains only numeric values. Text or empty cells will cause errors.
Advanced Applications
The Jarque-Bera test has numerous applications in finance and economics:
Asset Pricing Models
Testing normality of asset returns is crucial for:
- Capital Asset Pricing Model (CAPM)
- Black-Scholes option pricing
- Value at Risk (VaR) calculations
Risk Management
Non-normal distributions affect:
- Credit risk models
- Operational risk measurements
- Stress testing scenarios
Econometric Modeling
Normality assumptions underlie:
- Ordinary Least Squares (OLS) regression
- Maximum Likelihood Estimation (MLE)
- Hypothesis testing procedures
Alternative Tests for Normality
While the Jarque-Bera test is powerful, consider these alternatives depending on your specific needs:
| Test | Best For | Limitations | Excel Implementation |
|---|---|---|---|
| Shapiro-Wilk | Small samples (n < 50) | Not available natively in Excel | Requires VBA or add-ins |
| Anderson-Darling | General purpose | Complex calculation | Requires specialized software |
| Kolmogorov-Smirnov | Comparing with any distribution | Less powerful for normality | Not natively available |
| Lilliefors | Modification of K-S for normality | Not widely available | Requires custom implementation |
| D’Agostino-Pearson | Alternative to J-B | Similar to J-B but different weights | Complex Excel implementation |
Excel VBA Implementation
For advanced users, here’s a basic VBA function to calculate the Jarque-Bera statistic:
Function JarqueBera(rng As Range) As Double
Dim n As Long, i As Long
Dim sum As Double, sum2 As Double, sum3 As Double, sum4 As Double
Dim mean As Double, var As Double, skew As Double, kurt As Double
Dim jb As Double
n = Application.WorksheetFunction.Count(rng)
sum = 0: sum2 = 0: sum3 = 0: sum4 = 0
' Calculate moments
For i = 1 To n
sum = sum + rng.Cells(i, 1).Value
sum2 = sum2 + rng.Cells(i, 1).Value ^ 2
sum3 = sum3 + rng.Cells(i, 1).Value ^ 3
sum4 = sum4 + rng.Cells(i, 1).Value ^ 4
Next i
mean = sum / n
var = sum2 / n - mean ^ 2
skew = (sum3 / n - 3 * mean * var - mean ^ 3) / (var ^ (3 / 2))
kurt = (sum4 / n - 4 * mean * (sum3 / n) + 6 * mean ^ 2 * var + 3 * mean ^ 4) / (var ^ 2) - 3
' Calculate Jarque-Bera statistic
jb = n / 6 * (skew ^ 2 + kurt ^ 2 / 4)
JarqueBera = jb
End Function
To use this function:
- Press Alt+F11 to open VBA editor
- Insert a new module (Insert > Module)
- Paste the code above
- In Excel, use =JarqueBera(A1:A100) where A1:A100 contains your data
Academic References and Further Reading
For a deeper understanding of the Jarque-Bera test and its applications:
- Jarque, C. M., & Bera, A. K. (1980). Efficient tests for normality, homoscedasticity and serial independence of regression residuals. Economics Letters, 6(3), 255-259 – The original paper introducing the test
- Federal Reserve Board (2012). Testing for Normality with GARCH Models – Application in financial econometrics
- William H. Greene (2018). Econometric Analysis, 8th Edition. Pearson – Comprehensive treatment in Chapter 17
Frequently Asked Questions
Q: What sample size is appropriate for the Jarque-Bera test?
A: The test works best with sample sizes greater than 50. For smaller samples (n < 50), consider the Shapiro-Wilk test instead, though it's not natively available in Excel.
Q: Why does my Jarque-Bera statistic differ from other software?
A: Differences can arise from:
- Different skewness/kurtosis calculation methods (population vs sample)
- Handling of missing values
- Numerical precision differences
- Whether excess kurtosis (kurtosis-3) is used
Q: Can I use this test for time series data?
A: Yes, but be cautious. The Jarque-Bera test assumes i.i.d. (independent and identically distributed) data. For time series with autocorrelation, you may need to:
- Use returns instead of prices
- Test residuals from an ARMA/GARCH model
- Consider tests that account for serial correlation
Q: What should I do if my data fails the normality test?
A: Consider these approaches:
- Transformations: Log, square root, or Box-Cox transformations
- Non-parametric methods: Use tests that don’t assume normality
- Robust estimators: Use median instead of mean, IQR instead of standard deviation
- Model the non-normality: Use distributions like Student’s t, skewed t, or stable distributions
- Bootstrap methods: Resampling techniques that don’t rely on distributional assumptions