I am having difficulty in exactly understanding several statistical tests, such as the t-test and ANOVA test. These tests require that the data we use be normally distributed.

However, whilst sharing my experience in analyzing data a bit, I have analyzed several data sets from numerous sources online (web scraping, open-accessed data sources online, etc.), with the considerably high number of samples (hundreds, thousands). An example of the data in question is the amount of donation given to certain campaigns in a fixed periods of time (day 1 at 1pm, day 2 at 1pm, etc.).

And when I tested whether the distribution of the data was normal, using visual aids (histograms, Q-Q plots) and Shapiro-Wilks test, they all showed me that the data is not normal. For example, Shapiro-Wilk test gave a p-value of so small (less than 0.00000000000000022), of course, the null hypothesis has to be rejected, i.e. the data is not normally distributed.

Because I read in articles like in this link, it says

However, even if the distribution of the individual observations is not normal, the distribution of the sample means will be normally distributed if your sample size is about 30 or larger

So naturally, I am confused, is my data normally distributed or not? How often do you encounter normal and not-normal distribution, in real-life data?

EDIT Following the response by @hssay in his answer and comments, my main objective here is that I want to do ANOVA test to determine the relationship between my numerical and categorical data. But ANOVA needs the data to be normally distributed. So now I am confused as to how to conduct it since I have a "sample" consisting of thousands of rows of data that I took only once.


1 Answer 1


Your confusion is apt. Normally distributed data doesn't show up that often. Most of the real world datasets are more complex than normal. Many of natural occurring phenomenon (think: height of people in certain population) might be normal. But most of the cases where human behaviour plays a strong role (donations as you mentioned, incomes, peoples preferences) will show other distributions like fat tailed distributions or power law distributions.

But the result that you highlighted talks about a result in statistics called central limit theorem, which states that the mean that you infer from averaging will be normally distributed (irrespective of distribution of data). I'll explain below with an example.

Imagine you want to talk about heights of all males in United States. The first question that you might ask about such data is what's the central tendency (mean). But you may not have data about every male in the United States (getting that data will be too expensive). So you take a sample of let us say 100 people from each state. There's no way for you too know the distribution or shape of heights the entire population (you haven't collected that data!). You take the sample that you collected and calculate average of the heights. Can you make some statements about the how close is the average to the real mean of entire population? The computed average after sampling is a random variable since you will get different answer for every different sample. Central limit theorem says that this random variable is normally distributed with its mean same as the population mean and your estimate will get pretty closer as you have bigger samples. (Central limit theorem works in case of i.i.d. samples, that is samples are independent of each other and they are picked from same population.)

So in summary, normal distribution shows up more often with statistical tests because you are talking about distribution of average of sampled data, not the actual distribution of data (which can be non-normal). In a way, central limit theorem is why most of real world applications of statistics from simulations to election studies (psephology) works!

All the theory above answers the initial part of your answer. But for specifically running ANOVA test, you need the data to be (close) to normal distribution. Look at histogram of the data (yes, I know you have done sampling only once) and you can run tests for normality assumptions.

  • $\begingroup$ So, in your example, if I take 100 samples of each states, say 50 times; and for each of those times I took the samples, I calculated the mean height (so I will have 50 mean heights). This is the one that is likely to have the normal dist. according to the CTL? Not the first 100 samples in each states that I took? Did I get it right? @hssay $\endgroup$ Commented Aug 21, 2018 at 11:40
  • $\begingroup$ Yup you got it right!. The first 100 may have a very different distribution than normal. But the 50 mean heights will be normal, is what central limit theorem says. $\endgroup$
    – hssay
    Commented Aug 21, 2018 at 11:44
  • $\begingroup$ Following your example, my donation data is thousands of samples but only taken once. How will I do those tests? @hssay $\endgroup$ Commented Aug 21, 2018 at 11:57
  • $\begingroup$ What is your objective? Is it to ascertain whether your data is normally distributed? Or some other task? What are you trying to do with t-tests? If you add these details in the question, I can edit the answer to make it more informative. $\endgroup$
    – hssay
    Commented Aug 21, 2018 at 12:00
  • $\begingroup$ I edited the question @hssay $\endgroup$ Commented Aug 23, 2018 at 2:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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