Phone: +1 (888) 4279486
+1 (312) 2573777
Contact Us
NormalityTest
Attachment  Size  

NormalTest.xlsx 
Returns the pvalue of the normality test (i.e. whether a data set is wellmodeled by a normal distribution).
Syntax
X
is the univariate time series data (a one dimensional array of cells (e.g. rows or columns)).
Method
the statistical test to perform (1=JarqueBera, 2=ShapiroWilk, 3=ChiSquare (Doornik and Hansen)).
Method  Description 

1  JarqueBera test 
2  ShapiroWilk test 
3  Doornik ChiSquare test 
Remarks
 The sample data may include missing values (e.g. a time series as a result of a lag^{i} or difference operator).
 The JarqueBera test is more powerful the higher the number of values.

The test hypothesis for the data is from a normal distribution:
Where:
 is the null hypothesis^{i}.
 is the alternate hypothesis.
 is the normal probability distribution function.

The JarqueBera test is a goodnessoffit 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:
Where:
 is the sample skewness.
 is the sample excess kurtosis.
 is the number of nonmissing values in the data sample.

The JarqueBera statistic has an asymptotic chisquare distribution with two degrees of freedom and can be used to test the null hypothesis that the data is from a normal distribution.
Where:
 is the Chisquare probability distribution function.
 is the degrees of freedom for the Chisquare distribution.
 This is oneside (i.e. onetail) test, so the computed pvalue should be compared with the whole significance level ().
Examples
Example 1:
In this example, we use the random number generator in Excel (part of Data analysis Addin), 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 JaqueBera method, the PValues are calculated below:
For Normality test using the ShapiroWilk method, the PValues are calculated below:
For Normality test using the
(DoornickHansen) method, the PValues are calculated below:
More Examples
References
 Jarque, Carlos M.; Anil K. Bera (1980). "Efficient tests for normality, homoscedasticity and serial independence of regression residuals". Economics Letters 6 (3): 255259.
 Ljung, G. M. and Box, G. E. P., "On a measure of lack of fit in time series models." Biometrika 65 (1978): 297303
 Enders, W., "Applied econometric time series", John Wiley & Sons, 1995, p. 8687
 Shapiro, S. S. and Wilk, M. B. (1965). "An analysis of variance test for normality (complete samples)", Biometrika, 52, 3 and 4, pages 591611
Attachment  Size 

NormalTest.xlsx  29.67 KB 