Skip to course content
Free R statistics course

Statistical Data Analytics with R

Unit 04.01: The distribution of the data is not the distribution of the mean

The distribution of the data and the distribution of the mean are two different things, and only the second one has to be well behaved.

Why a skewed population still gives a symmetric mean

A sampling distribution is the distribution of an estimate across repeated samples. It is not the distribution of the data, and beginners conflate the two constantly.

The central limit theorem says that as n grows, the sampling distribution of the mean becomes approximately normal *whatever the population looks like*, and its spread shrinks in proportion to the square root of n. That is why t-tests work on skewed data at reasonable sample sizes.

It is also why 'the data is not normal' is rarely the objection people think it is. The relevant question is whether the sampling distribution is close enough to normal at your n, and that depends on the skew and the sample size together.

This block draws from a strongly skewed population at three sample sizes.

set.seed(102)
population <- rexp(100000, rate = 1/50)      # strongly skewed, not normal
cat("Population: exponential, mean", round(mean(population), 1),
    ", skewed right\n\n")

for (n in c(5, 30, 200)) {
  means <- replicate(2000, mean(sample(population, n)))
  cat(sprintf("n = %3d  sample-mean SD %6.2f   2.5%%..97.5%% of means: %6.1f .. %6.1f\n",
              n, sd(means), quantile(means, 0.025), quantile(means, 0.975)))
}

cat("\nThe population is nowhere near normal, yet the distribution OF THE MEANS\n")
cat("becomes symmetric and narrow as n grows. Its spread falls with sqrt(n):\n")
n5   <- sd(replicate(2000, mean(sample(population, 5))))
n200 <- sd(replicate(2000, mean(sample(population, 200))))
cat("  observed ratio SD(n=5)/SD(n=200):", round(n5 / n200, 2), "\n")
cat("  sqrt(200/5) predicts            :", round(sqrt(200 / 5), 2), "\n")

The population is exponential with a mean near 50.1 and a long right tail. At n = 5 the sample means have a standard deviation of 22.80 and the middle 95% run from 15.5 to 101.7 — wide and clearly asymmetric. At n = 200 the SD is 3.51 and the range is 43.7 to 57.2, symmetric and tight. The observed ratio of spreads, 6.22, matches the square-root-of-n prediction of 6.32 closely.

The mistake this prevents

The mistake is testing the raw data for normality and abandoning a t-test when it fails. The assumption concerns the sampling distribution of the mean, which is much better behaved than the data at any decent n.

Takeaway

Distinguish the distribution of the data from the distribution of the estimate. Expect the spread of an estimate to fall with the square root of n, and be more cautious about small samples than about non-normal ones.