Jarque–Bera test
Encyclopedia
In statistics
, the Jarque–Bera test is a goodness-of-fit test of whether sample data have the skewness
and kurtosis
matching a normal distribution. The test is named after Carlos Jarque
and Anil K. Bera
. The test statistic
JB is defined as
Statistics
Statistics is the study of the collection, organization, analysis, and interpretation of data. It deals with all aspects of this, including the planning of data collection in terms of the design of surveys and experiments....
, the Jarque–Bera test is a goodness-of-fit test of whether sample data have the skewness
Skewness
In probability theory and statistics, skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable. The skewness value can be positive or negative, or even undefined...
and kurtosis
Kurtosis
In probability theory and statistics, kurtosis is any measure of the "peakedness" of the probability distribution of a real-valued random variable...
matching a normal distribution. The test is named after Carlos Jarque
Carlos Jarque
Carlos M. Jarque Uribe is a Mexican economist and politician, currently the Representative of the Inter-American Development Bank to Europe and Principal Advisor to the President of the IDB....
and Anil K. Bera
Anil K. Bera
Anil K. Bera is an econometrician. He is Professor of Economics at University of Illinois at Urbana–Champaign's Department of Economics. He is most noted for his work with Carlos Jarque on the Jarque–Bera test.- Education :...
. The test statistic
Test statistic
In statistical hypothesis testing, a hypothesis test is typically specified in terms of a test statistic, which is a function of the sample; it is considered as a numerical summary of a set of data that...
JB is defined as
-
where n is the number of observations (or degrees of freedom in general); S is the sample skewnessSkewnessIn probability theory and statistics, skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable. The skewness value can be positive or negative, or even undefined...
, and K is the sample kurtosisKurtosisIn probability theory and statistics, kurtosis is any measure of the "peakedness" of the probability distribution of a real-valued random variable...
:
-
where and are the estimates of third and fourth central momentCentral momentIn probability theory and statistics, central moments form one set of values by which the properties of a probability distribution can be usefully characterised...
s, respectively, is the sample meanMeanIn statistics, mean has two related meanings:* the arithmetic mean .* the expected value of a random variable, which is also called the population mean....
, and
is the estimate of the second central moment, the varianceVarianceIn probability theory and statistics, the variance is a measure of how far a set of numbers is spread out. It is one of several descriptors of a probability distribution, describing how far the numbers lie from the mean . In particular, the variance is one of the moments of a distribution...
.
If the data come from a normal distribution, the JB statistic asymptoticallyAsymptotic analysisIn mathematical analysis, asymptotic analysis is a method of describing limiting behavior. The methodology has applications across science. Examples are...
has a chi-squared distribution with two degrees of freedomDegrees of freedom (statistics)In statistics, the number of degrees of freedom is the number of values in the final calculation of a statistic that are free to vary.Estimates of statistical parameters can be based upon different amounts of information or data. The number of independent pieces of information that go into the...
, so the statistic can be used to testStatistical hypothesis testingA statistical hypothesis test is a method of making decisions using data, whether from a controlled experiment or an observational study . In statistics, a result is called statistically significant if it is unlikely to have occurred by chance alone, according to a pre-determined threshold...
the hypothesis that the data are from a normal distribution. The null hypothesisNull hypothesisThe practice of science involves formulating and testing hypotheses, assertions that are capable of being proven false using a test of observed data. The null hypothesis typically corresponds to a general or default position...
is a joint hypothesis of the skewness being zero and the excess kurtosis being zero. Samples from a normal distribution have an expected skewness of 0 and an expected excess kurtosis of 0 (which is the same as a kurtosis of 3). As the definition of JB shows, any deviation from this increases the JB statistic.
For small samples the chi-squared approximation is overly sensitive, often rejecting the null hypothesis when it is in fact true. Furthermore, the distribution of p-values departs from a uniform distribution and becomes a right-skewed uni-modal distribution, especially for small p-values. This leads to a large Type I error rate. The table below shows some p-values approximated by a chi-squared distribution that differ from their true alpha levels for small samples.
Calculated p-value equivalents to true alpha levels at given sample sizes True α level 20 30 50 70 100 .1 .307 .252 .201 .183 .1560 .05 .1461 .109 .079 .067 .062 .025 .051 .0303 .020 .016 .0168 .01 .0064 .0033 .0015 .0012 .002
(These values have been approximated by using Monte Carlo simulation in MatlabMATLABMATLAB is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages,...
)
In MATLABMATLABMATLAB is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages,...
's implementation, the chi-squared approximation for the JB statistic's distribution is only used for large sample sizes (> 2000). For smaller samples, it uses a table derived from Monte Carlo simulations in order to interpolate p-values.
History
Considering normal sampling, and √β1 and β2 contours, noticed that the statistic JB will be asymptotically χ2(2)-distributed; however they also noted that “large sample sizes would doubtless be required for the χ2 approximation to hold”. Bowman and Shelton did not study the properties any further, preferring D’Agostino’s K-squared test.
Around 1979, Anil Bera and Carlos JarqueCarlos JarqueCarlos M. Jarque Uribe is a Mexican economist and politician, currently the Representative of the Inter-American Development Bank to Europe and Principal Advisor to the President of the IDB....
while working on their dissertations on regression analysis, have applied the Lagrange multiplier principle to the Pearson family of distributionsPearson distributionThe Pearson distribution is a family of continuous probability distributions. It was first published by Karl Pearson in 1895 and subsequently extended by him in 1901 and 1916 in a series of articles on biostatistics.- History :...
to test the normality of unobserved regression residuals and found that the JB test was asymptotically optimal (although the sample size needed to “reach” the asymptotic level was quite large). In 1980 the authors published a paper , which treated a more advanced case of simultaneously testing the normality, homoscedasticityHomoscedasticityIn statistics, a sequence or a vector of random variables is homoscedastic if all random variables in the sequence or vector have the same finite variance. This is also known as homogeneity of variance. The complementary notion is called heteroscedasticity...
and absence of autocorrelationAutocorrelationAutocorrelation is the cross-correlation of a signal with itself. Informally, it is the similarity between observations as a function of the time separation between them...
in the residuals from the linear regression model. The JB test was mentioned there as a simpler case. A complete paper about the JB Test was published in the International Statistical Review in 1987 dealing with both testing the normality of observations and the normality of unobserved regression residuals, and giving finite sample significance points.
Implementations
- ALGLIB includes implementation of the Jarque–Bera test in C++, C#, Delphi, Visual Basic, etc.
- gretlGretlgretl is an open-source statistical package, mainly for econometrics. The name is an acronym for Gnu Regression, Econometrics and Time-series Library. It has a graphical user interface and can be used together with X-12-ARIMA, TRAMO/SEATS, R, Octave, and Ox. It is written in C, uses GTK as widget...
includes an implementation of the Jarque–Bera test - RR (programming language)R is a programming language and software environment for statistical computing and graphics. The R language is widely used among statisticians for developing statistical software, and R is widely used for statistical software development and data analysis....
includes implementations of the Jarque–Bera test: jarque.bera.test in package tseries, for example, and jarque.test in package moments. - MATLABMATLABMATLAB is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages,...
includes implementation of the Jarque–Bera test, the function "jbtest".
-