# What are the standard statistical tests to see if data follows exponential or normal distributions?

What are the standard statistical tests to see if data follows exponential or normal distributions?

-
The best test probably depends on why exactly you're testing for normality/exponential (so some background would be helpful) but you can always use the Kolmogorov Smirnov test to test whether a given data set fits any pre-specified distribution (en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test). There are lots of methods used for the normal distribution specifically: en.wikipedia.org/wiki/Normality_test – Macro Jul 10 '12 at 22:53
The variables I'm dealing with are likely to follow normal or exponential distributions. Also, I have a factor which I don't care for. However, it imposes some variabilities on my data. Hence, I'd like to normalize the variables to suppress the effect of this nuisance factor. So, I thought it's better to normalize each varible based on their underlying distribution. That's why I need a test to decide between these two distributions. – smo Jul 10 '12 at 23:23
What does normalize mean in this sentence: I thought it's better to normalize each varible based on their underlying distribution? – Macro Jul 11 '12 at 0:11
While not a test, Q-Q plots are awesome for making a quick intuitive inspection of whether your data matches a distribution. – naught101 Jul 11 '12 at 0:26

It seems that you're trying to decide whether to model your data using the normal or the exponential distribution. This seems somewhat strange to me, as these distributions are very different from each other.

The normal distribution is symmetric whereas the exponential distribution is heavily skewed to the right, with no negative values. Typically a sample from the exponential distribution will contain many observations relatively close to $0$ and a few obervations that deviate far to the right from $0$. This difference is often easy to see graphically.

Here is an example where I've simulated $n=100$ observations from a normal distribution with mean $2$ and variance $4$ and an exponential distribution with mean $2$ and variance $4$:

The symmetry of the normal distribution and the skewness of the exponential can be seen using histograms, boxplots and scatterplots, as illustrated in the figure above.

Another very useful tool is a Q-Q-plot. In the example below, the points should approximately follow the line if the sample comes from a normal distribution. As you can see, this is the case for the normal data, but not for the exponential data.

If graphical examination for some reason isn't enough for you, you can still use a test to determine whether your distribution is normal or exponential. Since the normal distribution is a scale and location family, you'll want to use a test that is invariant under changes in scale and location (i.e. the result of the test should not change if you change your measurements from inches to centimetres or add $+1$ to all your observations).

When the null hypothesis is that the distribution is normal and the alternative hypothesis is that it is exponential, the most powerful location and scale invariant test is given by the statistic $$T_{E,N}=\frac{\bar{x}-x_{(1)}}{s}$$ where $\bar{x}$ is the sample mean, $x_{(1)}$ is the smallest observation in the sample and $s$ is the sample standard deviation. Normality is rejected in favour of exponentiality if $T_{E,N}$ is too large.

This test is actually a one-sided version of Grubbs' test for outliers. You'll find this implemented in most statistical software (but make sure that you use the right version - there are several alternative test statistics used for the outlier test!).

Reference for $T_{E,N}$ being the most powerful test: Section 4.2.4 of Testing for Normality by H.C. Thode.

-

For normality Anderson-Darling and Shapiro-Wilk are considered the best. For the exponential Lillerfors test is designed specifically for it.

-
this answer could be improved with a little detail on why each test is considered good/better than others. – naught101 Jul 11 '12 at 0:24
These tests are better in the sense that are the most powerful to departures from normal (Anderson-Darling) and exponential (Lillefors). I don't think it is easy based ont he form of the test to provide an ituitive explanation. – Michael Chernick Jul 11 '12 at 1:07
@Michael: The Anderson-Darling test for normality (like the Shapiro-Wilk dito) has respectable power against a wide range of alternatives, but it certainly isn't the most powerful (neither in general or on average). The choice of test should depend on the alternative at hand. I've never heard of the Lillerfors test - did you mean the Lilliefors test (which is actually a test for normality and not a test for exponentiality)? – MånsT Jul 11 '12 at 7:54
Of course I was referring to Lillefors test for exponentiality as it was the one I was suggesting for exponential distribution assumptions. I listed Shapiro-Wilk adn Anderson-Darling because to the best of my knowledge they are among the most powerful among tests for normality. What are the more powerful tests that you are referring to? – Michael Chernick Jul 11 '12 at 10:22
It depends on what type of alternative you have. Against skew alternatives, for instance, the sample skewness is often more powerful than S-W and A-D. The latter are omnibus tests that are pretty good on average, but if you know what kind of non-normality you are worrying about, it is better to use a directed test (such as the sample skewness test, which is directed at skew alternatives). – MånsT Jul 11 '12 at 10:33

Have you considered graphical methods to see how the data behaves?

Probability graph techniques usually involves ranking the data, applying the inverse CDF and then plotting the results on the Cartesian plane. This allows you to see if several values deviate from the hypothesized distribution and possibly account for the reason for the deviation.

-

For the exponential distribution, you can use a test called Moran's or Bartlett's test. The test statistic $B_n$ involves the sample mean $\overline{Y}$ as well as the sample mean $\overline{\log Y}$ of the logged $Y_i$ $$B_n = b_n \times \left\{\log \bar{Y} - \overline{\log Y} \right\} \qquad b_n = 2n \times \left\{1+ (n+1)/(6n) \right\}^{-1}$$ Under the null hypothesis we have approximately $B_n \sim \chi^2(n-1)$ and a two-sided test works. This test is designed against gamma alternatives.

See K.C. Kapur and L.R. Lamberson Reliability in engineering design. Wiley 1977.

-