Have a Question?
Phone: +1 (888) 427-9486
+1 (312) 324-0367
Fax: +1 (312) 238-9092
Contact Us
NormalityTest (Pro.)
| Attachment | Size | |
|---|---|---|
| NormalTest.xlsx |
Returns the p-value of the normality test (i.e. whether a data set is well-modeled by a normal distribution).
Syntax
NormalityTest(X, Method)
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=Jacque-Bera, 2=Shapiro-Wilk, 3=Chi-Square (Doornik and Hansen)).
| Method | Description |
|---|---|
| 1 | Jarque-Bera test |
| 2 | Shapiro-Wilk test |
| 3 | Doornik Chi-Square test |
Remarks
- The sample data may include missing values (e.g. a time series as a result of a lag or difference operator).
-
The test hypothesis for the data is from a normal distribution:


Where:
-
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:
![\[ \mathit{JB} = \frac{n}{6} \left( S^2 + \frac{K^2}{4} \right) \]](/sites/all/files/tex/c5b27573e46bf85012b6c27690578a9a031d12bc.png)
Where:
-
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.

Where:
-
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 (
).
Examples
Example 1:
| A | B | |
|---|---|---|
| 1 | Date | Data |
| 2 | 1/1/2008 | -2.83 |
| 3 | 1/2/2008 | -0.95 |
| 4 | 1/3/2008 | -0.88 |
| 5 | 1/4/2008 | 1.21 |
| 6 | 1/5/2008 | -1.67 |
| 7 | 1/6/2008 | 0.83 |
| 8 | 1/7/2008 | -0.27 |
| 9 | 1/8/2008 | 1.36 |
| 10 | 1/9/2008 | -0.34 |
| 11 | 1/10/2008 | 0.48 |
| Formula | Description (Result) | |
|---|---|---|
| =NormalityTest($B$2:$B$11,1) | Jarque-Bera test (0.7711) | |
| =NormalityTest($B$2:$B$11,2) | Shapiro-Wilk test (0.8003) | |
| =NormalityTest($B$2:$B$11,3) | Doornik Chi-Square test (0.7136) |
References
- 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
External Links
- Wikipedia - Portmanteau test
- Wikipedia - Jarque-Bera test
- Wikipedia - Shapiro-Wilk Normality test
- 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
