# Is there any statistic or method which could describe how much a distribution deviates from the normal distribution?

Is there any statistic or method which could describe how much a distribution deviates from the normal distribution? I want to test if my data is normal or not at some level of significance, and I have huge many of samples, I am wondering if there is any quantitative way to test it on my computer. Thank you very much.

• There's an entire area -- goodness of fit testing -- with (literally) thousands of papers on the topic (I've read several hundred of them... & yes, it took a long time) and a number of books on it. Perhaps the most popular test for general normality (with unspecified mean and variance) would be the Shapiro-Wilk test, though there are several good alternatives. However, explicitly testing for normality (or whatever other distribution) is usually not useful (because people tend to use it for situations where it's not really dealing with the problem they are trying to solve). On the other hand... – Glen_b -Reinstate Monica Jul 12 '17 at 3:00
• .... measuring deviation from normality in some way (rather than testing it) may be a bit more useful in some situations. Interestingly, while a search on goodness of fit normality turns up 123 hits, there are only 17 that managed to use both tags. I will add the tags to your post to make it easier to find realted questions – Glen_b -Reinstate Monica Jul 12 '17 at 3:03
• You may also find this question: Is normality testing essentially useless? helpful. [If Harvey's fine answer hadn't been there already, I'd have posted a very similar answer myself -- except his is clearer and more succinct than I'd likely have managed.] – Glen_b -Reinstate Monica Jul 12 '17 at 23:26

Skewness and kurtosis are helpful statistics to see how far from non-normal you are. A normal distribution should have a skew near zero and a kurtosis near three (note that some programs subtract three from kurtosis, so kurtosis should be near zero, as well. You'll have to check documentation).

Here are the statistics for a randomly-generated normal distribution:

> set.seed(1839)
> data <- rnorm(1000)
> moments::skewness(data)
[1] 0.03057696
> moments::kurtosis(data)
[1] 2.95321


Here's what it looks like for a poisson distribution:

> set.seed(1839)
> data <- rpois(1000, 0.1)
> moments::skewness(data)
[1] 3.129368
> moments::kurtosis(data)
[1] 12.08103


You can also look at a histogram, where you want it to look like the typical bell-curve, or a Q-Q plot, where you expect the data points to fall on a line where the observed quantiles are equal to the expected quantiles.

There are a number of ways to test for "significance" of non-normality, but I would warn against doing this, especially if you have large samples. Even a small deviation from normality can be significant when $n$ is large enough (see simulations here).

Given that many methods can handle some level of modest non-normality, I would use your eyes: Look at the Q-Q plot, look at the skewness and kurtosis. I would not rely too much on a $p$-value if you have a large $n$.

If you are worried about normality, you can always use other robust methods such as sandwich estimators or bootstrapping.

• Thank you very much. Actually, I have around 20k samples and each sample has 2k point – user133140 Jul 11 '17 at 16:05
• @user133140 Yes, I worry then that you'll get a significant result even if the deviance from normality is trivial. Remember that p-values test against very strict and specific null hypotheses. If your H0: x = 0, then an x = 0.000000001 (with large enough sample size) still "rejects" H0 – Mark White Jul 11 '17 at 16:17
• @Mark +1 but note that you can be very far from normal when skewness and kurtosis are exactly at the normal values. – Glen_b -Reinstate Monica Jul 12 '17 at 2:57
• @Glen_b could you provide an example? – Mark White Jul 12 '17 at 2:58
• stats.stackexchange.com/questions/154951/… ... none of those were really attempts to maximize non-normality (by any criterion) but they do give a clear indication of the sorts of things that just looking at skewness and kurtosis will be completely blind to. – Glen_b -Reinstate Monica Jul 12 '17 at 3:15

You can use any Normality test. Kolmogorov-Smirnov, Liliefors and Shapiro–Wilk test are usually implemented in statistical softwares. I would use the Shapiro–Wilk test. The value of the test statistic can be used as the maesure of non-normality.

• @user133140 note that Kolmogorov-Smirnov is for completely specified distributions (you could test normality with a particular population mean and standard deviation) -- Lilliefors is the "general - normality" (unspecified parameter) version of it. – Glen_b -Reinstate Monica Jul 12 '17 at 3:16