Jarque-Bera test

In statistics, the Jarque-Bera test is a goodness-of-fit measure of departure from normality, based on the sample kurtosis and skewness. The test statistic JB is defined as



\mathit{JB} = \frac{n}{6} \left( S^2 + \frac{(K-3)^2}{4} \right), $$

where n is the number of observations (or degrees of freedom in general); S is the sample skewness, K is the sample kurtosis, defined as



S = \frac{ \mu_3 }{ \sigma^3 } = \frac{ \mu_3 }{ \left( \sigma^2 \right)^{3/2} } = \frac{ \frac{1}{n} \sum_{i=1}^n \left( x - \bar{x} \right)^3}{ \left( \frac{1}{n} \sum_{i=1}^n \left( x - \bar{x} \right)^2 \right)^{3/2}} $$



K = \frac{ \mu_4 }{ \sigma^4 } = \frac{ \mu_4 }{ \left( \sigma^2 \right)^{2} } = \frac{\frac{1}{n} \sum_{i=1}^n \left( x - \bar{x} \right)^4}{\left( \frac{1}{n} \sum_{i=1}^n \left( x - \bar{x} \right)^2 \right)^2} $$

where μ3 and μ4 are the third and fourth central moments, respectively, $$\bar{x}$$ is the sample mean, and σ2 is the second central moment, the variance.

The statistic JB has an asymptotic chi-square distribution with two degrees of freedom and can be used to test the null hypothesis that the data are from a normal distribution. The null hypothesis is a joint hypothesis of both the skewness and excess kurtosis being 0, since samples from a normal distribution have an expected skewness of 0 and an expected excess kurtosis of 0. As the definition of JB shows, any deviation from this increases the JB statistic.

Implementations

 * ALGLIB includes implementation of the Jarque-Bera test in C++, C#, Delphi, Visual Basic, etc.

Jarque-Bera-Test