Returns the p-value of the normality test (i.e. whether a data set is well-modeled by a normal distribution).
is the univariate time series data (a one dimensional array of cells (e.g. rows or columns)).
the statistical test to perform (1=Jarque-Bera, 2=Shapiro-Wilk, 3=Chi-Square (Doornik and Hansen)).
|3||Doornik Chi-Square test|
- The sample data may include missing values (e.g. a time series as a result of a lagi or difference operator).
- The Jarque-Bera test is more powerful the higher the number of values.
The test hypothesis for the data is from a normal distribution:
- is the null hypothesisi.
- is the alternate hypothesis.
- is the normal probability distribution function.
- The Jarque-Bera test is a goodness-of-fit measure of departure from normality based on the sample kurtosis and skewness. The test is named after Carlos M. Jarque and Anil K. Bera. The test statistic JB is defined as:
- is the sample skewness.
- is the sample excess kurtosis.
- is the number of non-missing values in the data sample.
The Jarque-Bera statistic has an asymptotic chi-square distribution with two degrees of freedom and can be used to test the null hypothesis that the data is from a normal distribution.
- is the Chi-square probability distribution function.
- is the degrees of freedom for the Chi-square distribution.
- This is one-side (i.e. one-tail) test, so the computed p-value should be compared with the whole significance level ().
In this example, we use the random number generator in Excel (part of Data analysis Add-in), and generated a 5 sequences of 250 numbers from different distributions: Normal, Uniform, Binomial and Poisson
Next, from each sequence, we run the Normality test of one method on various sample sizes: 10,20,30,40,50,100,150,200 and 250.
For Normality test using the Jaque-Bera method, the P-Values are calculated below:
For Normality test using the Shapiro-Wilk method, the P-Values are calculated below:
For Normality test using the (Doornick-Hansen) method, the P-Values are calculated below:
- Jarque, Carlos M.; Anil K. Bera (1980). "Efficient tests for normality, homoscedasticity and serial independence of regression residuals". Economics Letters 6 (3): 255-259.
- Ljung, G. M. and Box, G. E. P., "On a measure of lack of fit in time series models." Biometrika 65 (1978): 297-303
- Enders, W., "Applied econometric time series", John Wiley & Sons, 1995, p. 86-87
- Shapiro, S. S. and Wilk, M. B. (1965). "An analysis of variance test for normality (complete samples)", Biometrika, 52, 3 and 4, pages 591-611