5
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ How large is your dataset? Is it one-dimensional or higher-dimensional? $\endgroup$ – alancalvitti Feb 4 '13 at 9:51
  • $\begingroup$ There is no clear answer - I am looking for universally valid solution, because I need to implement it into my app. $\endgroup$ – Artegon Feb 4 '13 at 10:02
  • $\begingroup$ 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) $\endgroup$ – Golob Feb 4 '13 at 10:08
3
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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