3
$\begingroup$

I was going through the assumptions of z-test and t-test, all most all of the references mention that the data should be normally distributed. There is no mention of estimator's distribution. If the distribution of the data is what we care about, why do we talk about CLT which only applies to the estimator? So this raises to the question.

  1. Does estimator being normally distributed help us in choosing t or z test even if the data is not normally distributed?
$\endgroup$

3 Answers 3

6
$\begingroup$

Data drawn from a normal distribution assures that the z-score has a normal distribution. The central limit theorem only says that the z-score converges to normality, and it doesn’t even say how fast, so our 30 samples might not result in a very normal-like z-score (though the convergence is often quite fast...while it’s just a joke, there’s a reason that I say that statisticians think $30=\infty$).

$\endgroup$
10
  • 1
    $\begingroup$ That is incorrect. The z-stat (I’ve been calling it z-score, but I mean z-stat) will be very close to normally distributed if your data are drawn from a uniform distribution and you have a decent sample size...and that’s all that matters. As long as the test statistic is close enough to following the theoretical distribution, then you’re good. $\endgroup$
    – Dave
    Commented May 14, 2020 at 2:19
  • 1
    $\begingroup$ That gets into issues about whether or not you’re “close enough” to the theoretical distribution, the idea of how fast the convergence is. Sure, the limit is normal, but maybe it’s not normal enough with the 65 observations you have, so you’d want to explore a method like Wilcoxon. But the major point you need to understand is that we only care about the distribution of the test statistic. The data coming from a norma distribution assures is of having a normal z-stat, but we can get super close for many other distributions. $\endgroup$
    – Dave
    Commented May 14, 2020 at 2:34
  • 1
    $\begingroup$ That’s not what I meant, though that topic warrants a separate question that you may elect to post. Do a search first, though, as that topic very likely has come up on here, even if I don’t know the post offhand. $\endgroup$
    – Dave
    Commented May 14, 2020 at 2:54
  • 2
    $\begingroup$ "if we don't know the underlying distribution, then it is always better to choose non-parametric approaches" - no, it isn't. Asymptotics may be good enough for parametric tests to be more powerful. Why would parametric statistics ever be preferred over nonparametric? $\endgroup$ Commented May 14, 2020 at 6:55
  • 1
    $\begingroup$ Just saw this. All good additions. (+1) About boxplot outliers in samples from normal populations. For $n=30,$ about 29% of samples have at least one outlier, average nr per sample 0.45; for $n=100,$ 52% and 0.92; for $n=500,$ 45% and 3.7. R code for 500 is nr.out = replicate(10^5, length(boxplot.stats(rnorm(500))$out)) followed by mean(nr.out>0) and mean(nr.out). $\endgroup$
    – BruceET
    Commented May 14, 2020 at 15:37
6
$\begingroup$

@Dave mentions the speed of convergence in the Central Limit Theorem. The shape of the distribution from which samples are taken can make a big difference in the speed of convergence.

  • Means of samples of size 15 from a uniform distribution are very nearly normally distributed. So a sample of size $n = 30$ would easily be large enough to use t tests.
  • Means of samples of size 50 from an exponential distribution are not normal. So a sample of size $n = 30$ would not be large enough to use t tests (150 would be a lot better).

Usually, the 'rule of 30' is accompanied by warnings that it may not apply when data show extreme skewness or many outliers. Figure below shows two histograms, each for 10,000 means.

Means of 15 uniform observations in the left panel, and means of 50 exponential observations at right. Red curves are normal curves that match the mean and SD in the respective histograms. (R code for the simulations and making the figure is shown below the figure.)

enter image description here

set.seed(2020)
a.unif = replicate(10^4, mean(runif(15, 0,30)))
a.exp = replicate(10^4, mean(rexp(50, 1/15)))

par(mfrow=c(1,2))
 hist(a.unif, prob=T, col="skyblue2", 
      main="n=15: Sample Averages of Uniform Data")
  curve(dnorm(x, mean(a.unif), sd(a.unif)), add=T, col="red", lwd=2) 
 hist(a.exp, prob=T, col="skyblue2", 
      main="n=50: Sample Averages of Exponential Data")
  curve(dnorm(x, mean(a.exp), sd(a.exp)), add=T, col="red", lwd=2)
par(mfrow=c(1,1)) 

About outliers: Samples of size 30 from a uniform distribution very seldom have boxplot outliers--less than 1 in 100 do. By contrast, about 75% of samples of size 30 from an exponential distribution have outliers in a boxplot and most have their upper whisker longer than the lower one, indicating upward skewness. So data frequently show warning signs when t tests are inappropriate.

All histograms in the figure below are based on samples of size 30, from uniform distributions at the top, exponential distributions in the bottom panel.

enter image description here

$\endgroup$
8
  • $\begingroup$ Thank you for the answer but, if the "data" is not-normally distributed (Mean may be normally distributed because of CLT) can we apply t-test or z-test? because the assumption states that the data should be normally distributed but not estimator. $\endgroup$
    – Angadishop
    Commented May 14, 2020 at 1:34
  • 2
    $\begingroup$ @Angadishop data are never normally distributed. Data are inherently discrete. Whatever you read about the estimator not being normal is dead wrong. We only care about the estimator being normal or close to it (CLT convergence). Starting with data drawn from a normal distribution helps get us a normal z-score, and when the data are drawn from a distribution that isn’t too funky and the sample size is reasonably large, the distribution of the estimator is trivially different from a true normal distribution. But the data are never normal, only ever (potentially) drawn from a normal population. $\endgroup$
    – Dave
    Commented May 14, 2020 at 1:39
  • 2
    $\begingroup$ Perhaps it’s fair to cal it slang when we say that we have normally distributed data. That’s the short way to say that we have data observations drawn from a normal population distribution. $\endgroup$
    – Dave
    Commented May 14, 2020 at 1:40
  • $\begingroup$ Thank you for the clarification, so let's say I've drawn 100 samples from a uniform population distribution, can I apply t-test or z-test? $\endgroup$
    – Angadishop
    Commented May 14, 2020 at 1:45
  • $\begingroup$ If you're investigating data from uniform distributions various kinds of tests would be appropriate, and I'd say t and z tests among them. (Depending on circumstances and purposes, you might find a more appropriate test than z or t, but I'd guess z or t wouldn't be wrong.) $\endgroup$
    – BruceET
    Commented May 14, 2020 at 2:03
4
$\begingroup$

The other answers here are already very good. I'll add a very short additional one.

I was going through the assumptions of z-test and t-test, all most all of the references mention that the data should be normally distributed.

If your data comes from a normal distribution, then the mean is normally distributed.

If your data comes from a (possibly non-normal) distribution, then your mean is asymptotically normally distributed by the CLT.

Normality of the data is sufficient but not necessary for the mean to be normal "enough".

Also: there is unfortunately an enormous amount of misinformation out there, which explains the references you have been seeing.

If the distribution of the data is what we care about, why do we talk about CLT which only applies to the estimator?

We usually care about the distribution of the estimator in inferential statistics, since we are comparing a test statistic to an asymptotic distribution. The distribution of the data are only of secondary interest. And see above on the misinformation out there.

$\endgroup$

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.