Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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|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 en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test) –  Golob Feb 4 '13 at 10:08

1 Answer 1

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|improve this answer

Your Answer

 
discard

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.