Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have data sets (measurements) and I need to know if values are normally distributed. I would like to get this information programmatically in my application and not via plotting and checking it visually myself. Is there some statistical method how to check it?

I have an idea to use mean and median and if median equals mean (or is very close) the distribution can be considered as normally distributed. But I'm not sure what "close" is enough.

share|cite|improve this question
How large is your dataset? Is it one-dimensional or higher-dimensional? – alancalvitti Feb 4 '13 at 9:51
There is no clear answer - I am looking for universally valid solution, because I need to implement it into my app. – user1315357 Feb 4 '13 at 10:02
Also, what do you mean by programatically? In most environments there are functions (as in SAS, R, SPSS) or libraries (python, java) that have some kind of normality test implemented (eg – Golob Feb 4 '13 at 10:08
up vote 3 down vote accepted

This is a very wide subject - the Wikipedia article on the subject, is a good place to start.

In short, there are many methods and the "right" method for you depends on what you need:

  • Do you know the mean and variance apriori?
  • Do you need an exact estimate of how far you are from a normal distribution, or is yes / no answer good enough?
  • How much computation time do you have?

I think the easiest method is to calculate the skewness and kurtosis of your data. If both are "near" enough to zero, it's normal. To get the "score" one method often used is the Jarque-Beta test which gives you the p-value given the calculated skewness and kurtosis.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.