**Have a Question?**

**Phone:** +1 (888) 427-9486

+1 (312) 257-3777

Contact Us

# Normality Test - Facts and Myths

Attachment | Size | |
---|---|---|

Normality_Test.pdf | ||

NormalTest.xlsx |

In time series and econometric modeling, we often encounter the normality test as part of the residuals diagnosis to validate a model's assumptions(s).

Does the Normality test1 tell us whether standardized residuals follow a Gaussian distribution? Not exactly.

So, what exactly does this test do? Why do we have several different methods for testing normality?

Note: For illustration, we simulated 5 series of random numbers using the Analysis Pack in Excel. Each series has a different underlying distribution: Normal, Uniform, Binomial, Poisson, Student’s t and F distribution.

## Background

Let’s assume we have a data set of a univariate (), and we wish to determine whether the data set is well-modeled by a Gaussian distribution.

Where

- null hypothesis (X is normally distributed)
- alternative hypothesis (X distribution deviates from Gaussian)
- Gaussian or normal distribution

In essence, the normality test is a regular test of a hypothesis that can have two possible outcomes: (1) rejection of the null hypothesis of normality (), or (2) failure to reject the null hypothesis.

In practice, when we can’t reject the null hypothesis of normality, it means that the test fails to find deviance from a normal distribution for this sample. Therefore, it is possible the data is normally distributed.

The problem we typically face is that when the sample size is small, even large departures from normality are not detected; conversely, when your sample size is large, even the smallest deviations from normality will lead to a rejected null.

## Normality Tests

How do we test for normality? In principle, we compare the empirical (sample) distribution with a theoretical normal distribution. The measure of deviance can be defined based on distribution moments, a Q-Q plot, or the difference summary between two distribution functions.

Let’s examine the following normality tests:

- Jarque-Bera test

- Shapiro-Wilk test

- Anderson – Darling test

## Jarque-Bera

The Jarque-Bera test is a goodness-of-fit measure of departure from normality based on the sample kurtosis and skew. In other words, JB determines whether the data have the skew and kurtosis matching a normal distribution.

The test is named after Carlos M. Jarque and Anil K. Bera. The test statistic for JB is defined as:

Where

- the sample skew
- the sample excess kurtosis
- the number of non-missing values in the sample
- the test statistic; has an asymptotic chi-square distribution

**Notes:** For small samples, the chi-squared approximation is overly sensitive, often rejecting the null hypothesis (i.e. normality) when it is in fact true.

In the table above, we compute the P-value of the normality test (Using the Normality Test function in NumXL). Note that the JB test failed to detect a departure from normality for symmetric distributions (e.g. Uniform and Students) using a small sample size ().

## Shapiro-Wilk

Based on the informal approach to judging normality, one rather obvious way to judge the near linearity of any Q-Q plot (see Figure 1) is to compute its "correlation coefficient."

When this is done for normal probability (Q-Q) plots, a formal test can be obtained that is essentially equivalent to the powerful Shapiro-Wilk test W and its approximation W.

Where

- the order (smallest number in the sample)
- a constant given by
- the expected values of the order statistics of independent and identical distributed random variables sampled from Gaussian distribution
- the covariance matric of order statistics

In the table above, the SW P-values are significantly better for small sample sizes () in detecting departure from normality, but exhibit similar issues with symmetric distribution (e.g. Uniform, Student’s t).

## Anderson-Darling

The Anderson-Darling tests for normality are based on the empirical distribution function (EDF). The test statistics is based on the squared difference between normal and empirical:

In sum, we construct an empirical distribution using the sorted sample data, compute the theoretical (Gaussian) cumulative distribution () at each point () and, finally, calculate the test statistic

And, in the case where the variance and mean of the normal distribution are both unknown, the test statistic is expressed as follows:

Note: The AD Test is currently planned for the next NumXL release; we won’t show results here, as you can’t yet reproduce them.

## Conclusion

These three tests use very different approaches to test for normality: (1) JB uses the moments-based comparison, (2) SW examines the correlation in the Q-Q plot and (3) AD tests the difference between empirical and theoretical distributions.

In a way, the tests complement each other, but some are more useful in certain situations than others. For example, JB works poorly for small sample sizes (n<50) or very large sample sizes (n>5000).

The SW method works better for small sample sizes (n>3 but less than 5000).

In terms of power, Stephens2 found AD statistics () to be one of the best EDF statistics for detecting departure from normality, even when used with small samples (). Nevertheless, the AD test has the same problem with a large sample size, where slight imperfections lead to a rejection of a null hypothesis.

- 1. You can use the normal probability plots (i.e. Q-Q plots) as an informal means of assessing the non-normality of a set of data. However, you may need considerable practice before you can judge them with any degree of confidence.
- 2. Stephens, M. A. (1974). "EDF Statistics for Goodness of Fit and Some Comparisons". Journal of the American Statistical Association 69: 730–737

Attachment | Size |
---|---|

Normality_Test.pdf | 462.73 KB |

NormalTest.xlsx | 142.3 KB |