- Distinguish a parameter from a statistic, and explain what a sampling distribution is and why it is the key idea of inference.
- State and use the mean and standard error of the sample mean, and explain the square-root law for sample size.
- State the central limit theorem, explain when it applies, and describe when it fails.
- Find probabilities about a sample mean and about a sample proportion using the normal approximation.
- Explain bias, variance, and standard error, and use the finite population correction.
- Judge an estimator by its bias and its variability.
Every statistical inference in the rest of this course rests on one question: if we took another sample, how different would the answer be? A sample mean, a sample proportion, a regression slope: each is a number computed from random data, so each is itself a random variable with its own distribution. That distribution, called a sampling distribution, tells us how far a statistic is likely to land from the truth. This chapter is the bridge between probability (Chapters 5 to 7) and inference (Chapters 9 to 14).
Parameters, statistics, and sampling variability
| Quantity | Population parameter (fixed, usually unknown) | Sample statistic (random, computed from data) |
|---|---|---|
| Mean | \(\mu\) | \(\bar{x}\) |
| Proportion | \(p\) | \(\hat{p}\) |
| Standard deviation | \(\sigma\) | \(s\) |
| Correlation | \(\rho\) | \(r\) |
| Slope | \(\beta_1\) | \(b_1\) |
Suppose 40 percent of a large university's students commute by bus (\(p = 0.40\), unknown to us). We survey a random sample of 100 students and find \(\hat{p} = 0.37\). A different random sample would give a different value: 0.43, then 0.41, then 0.38. This chance variation from sample to sample is sampling variability. If we could repeat the sampling process thousands of times and plot all the \(\hat{p}\) values, we would see the sampling distribution of \(\hat{p}\).
The sampling distribution of a statistic is the distribution of the values the statistic takes over all possible samples of the same size \(n\) from the population. It answers "How would this statistic vary if we repeated the study?" We describe it by its center (is it centered at the parameter? that is bias), its spread (how much does it vary? the standard error), and its shape.
- The population distribution: how individual values are spread in the population (mean \(\mu\), SD \(\sigma\)).
- The distribution of one sample: the \(n\) values you actually collected (mean \(\bar{x}\), SD \(s\)).
- The sampling distribution of the statistic: how \(\bar{x}\) (or \(\hat{p}\), ...) varies from sample to sample. It is a theoretical or simulated distribution: you only ever see one value from it.
The sampling distribution of the sample mean
Draw a random sample of size \(n\) from a population with mean \(\mu\) and standard deviation \(\sigma\). The observations \(X_1, \dots, X_n\) are independent, each with mean \(\mu\) and variance \(\sigma^2\). The sample mean is \(\bar{X} = \frac{1}{n}(X_1 + \cdots + X_n)\). From the rules of Chapter 6:
\[E(\bar{X}) = \frac{1}{n}\,n\mu = \mu, \qquad \operatorname{Var}(\bar{X}) = \frac{1}{n^2}\,n\sigma^2 = \frac{\sigma^2}{n}, \qquad \sigma_{\bar{X}} = \frac{\sigma}{\sqrt{n}}.\]- Unbiased: \(\mu_{\bar{x}} = \mu\). Sample means are centered at the population mean. Some samples give values too high, some too low, but there is no systematic error.
- Standard error: \(\text{SE}(\bar{x}) = \sigma_{\bar{x}} = \dfrac{\sigma}{\sqrt{n}}\). This is the typical distance of a sample mean from \(\mu\). (In practice \(\sigma\) is unknown and we estimate the standard error by \(s/\sqrt{n}\).)
- Square-root law: to cut the standard error in half you need four times as many observations; to cut it by a factor of 10 you need 100 times as many. Precision has diminishing returns.
- Shape: if the population is normal, \(\bar{x}\) is exactly normal for every \(n\): \(\bar{X} \sim N(\mu, \sigma/\sqrt{n})\). If not, see the central limit theorem below.
The standard deviation \(\sigma\) (or \(s\)) measures how much individual observations vary. The standard error \(\sigma/\sqrt{n}\) measures how much the sample mean varies. Averaging cancels out some of the individual noise, so the mean is always less variable than one observation. Collecting more data does not change \(\sigma\) (individuals are as spread out as ever) but shrinks the standard error.
Example 8.1: An individual versus a sample mean
A machine fills bags with a mean of \(\mu = 50\) g and standard deviation \(\sigma = 12\) g (approximately normal; hypothetical values). A random sample of \(n = 36\) bags is weighed.
The sample mean has \(\mu_{\bar{x}} = 50\) and \(\sigma_{\bar{x}} = 12/\sqrt{36} = 2\) g.
A single bag exceeds 53 g with probability \(P(X > 53) = P(Z > 0.25) = 0.4013\). But the mean of 36 bags exceeds 53 g only with probability \(P(\bar{X} > 53) = P\!\left(Z > \dfrac{53-50}{2}\right) = P(Z > 1.5) = 0.0668\). It is common for one bag to be heavy; it is rare for a whole sample to average heavy.
The central limit theorem
If the population is normal, so is \(\bar{x}\). But most real populations are not normal. The astonishing fact is that the shape of the sampling distribution of \(\bar{x}\) becomes normal anyway as \(n\) grows.
Let \(X_1, \dots, X_n\) be independent observations from any population with finite mean \(\mu\) and finite standard deviation \(\sigma\). Then for large \(n\) the sampling distribution of \(\bar{X}\) is approximately normal:
\[\bar{X} \;\approx\; N\!\left(\mu,\ \frac{\sigma}{\sqrt{n}}\right), \qquad\text{equivalently}\qquad \frac{\bar{X} - \mu}{\sigma/\sqrt{n}} \;\approx\; N(0, 1).\]The approximation improves as \(n\) increases, and it is exact in the limit \(n \to \infty\).
The CLT is the reason the normal distribution appears everywhere in statistics: sums and averages of many small independent contributions are approximately normal, regardless of what the individual contributions look like. It is what makes confidence intervals and tests for means work for real, non-normal data.
How large is "large"?
The required \(n\) depends on how non-normal the population is.
| Population shape | Rough guide to when \(\bar{x}\) is approximately normal |
|---|---|
| Normal | Any \(n\) (exactly normal) |
| Symmetric, no outliers (uniform, triangular) | \(n \ge 5\) to 10 |
| Moderately skewed (exponential) | \(n \ge 30\) or so |
| Strongly skewed or with occasional huge values (incomes, lognormal) | Hundreds; sometimes far more |
| Heavy tails with infinite variance (Cauchy) | The CLT does not apply at all |
The familiar rule "\(n \ge 30\)" is a rough compromise, not a theorem. Skewness of the sampling distribution shrinks like \(1/\sqrt{n}\), so a population with skewness 2 has a mean with skewness \(2/\sqrt{30} = 0.37\) at \(n = 30\): mildly skewed but usable.
Example 8.2: A skewed population, n = 64
Waiting times at a service counter are strongly right skewed with mean \(\mu = 20\) minutes and standard deviation \(\sigma = 20\) minutes (hypothetical, exponential-like). A random sample of \(n = 64\) customers is observed. What is the probability their average wait is under 18 minutes?
By the CLT, \(\bar{X} \approx N(20,\ 20/\sqrt{64}) = N(20, 2.5)\). Then \(z = (18-20)/2.5 = -0.80\) and \(P(\bar{X} < 18) = \Phi(-0.80) = 0.2119\). (One individual waiting under 18 minutes, on the other hand, is not a normal-curve question at all: the population is skewed.) A simulation of this exact scenario gives about 0.217, slightly above the normal answer because a little skewness remains even at \(n = 64\).
The CLT does not say that a large sample of data looks normal. A histogram of 1,000 waiting times will still be right skewed. It says the average of the sample varies in a normal-looking way from sample to sample. The CLT also requires that the observations be independent and (in the simple version) identically distributed, that is, a random sample.
When the central limit theorem fails
- Tiny samples from skewed populations. The sampling distribution keeps the skew.
- Extreme outliers or heavy tails. Populations like incomes or insurance claims occasionally produce a value that dominates the mean; convergence can take very large \(n\).
- Infinite variance. For a Cauchy distribution the mean of \(n\) observations is exactly as variable as one observation: averaging does not help, even with a million values. (The tool below demonstrates this.)
- Dependent observations. Clustered or time-series data can have far greater variability than \(\sigma/\sqrt{n}\) suggests.
The sampling distribution of a sample proportion
A sample proportion is a sample mean in disguise. Code each individual as 1 (success) or 0 (failure); then \(\hat{p} = \bar{x}\), the mean of these 0/1 values. Each has mean \(p\) and variance \(p(1-p)\). So the general results apply.
For a random sample of size \(n\) from a population with success probability \(p\):
\[\mu_{\hat{p}} = p, \qquad \sigma_{\hat{p}} = \sqrt{\frac{p(1-p)}{n}}.\]If \(np \ge 10\) and \(n(1-p) \ge 10\) (the success-failure condition), the sampling distribution is approximately normal: \(\hat{p} \approx N\!\left(p, \sqrt{p(1-p)/n}\right)\). This is the normal approximation to the binomial (Chapter 7) in proportion form, since \(\hat{p} = X/n\) with \(X \sim \text{Bin}(n, p)\). The independence condition requires that the sample be random and less than 10 percent of the population.
Example 8.3: A poll and a threshold
Suppose 60 percent of voters in a region support a measure (\(p = 0.60\)). A random poll of \(n = 200\) is taken. Check the conditions: \(np = 120 \ge 10\) and \(n(1-p) = 80 \ge 10\); the region has many more than 2,000 voters.
\(\mu_{\hat{p}} = 0.60\) and \(\sigma_{\hat{p}} = \sqrt{0.6(0.4)/200} = 0.0346\).
The probability the poll shows support above 65 percent: \(z = (0.65 - 0.60)/0.0346 = 1.443\), so \(P(\hat{p} > 0.65) = 0.0745\). About 7 percent of polls of this size would overstate support by 5 points or more, even with a perfect random sampling method. (The exact binomial probability is 0.0639 and the continuity-corrected normal value is 0.0648, so the simple normal answer is a slight overstatement; the calculator below shows all three.) Note also the spread: 95 percent of polls fall within about \(2 \times 0.0346 = 0.069\) of the truth, the source of the "margin of error" you see in news polls.
The standard error \(\sqrt{p(1-p)/n}\) contains \(n\), not \(N\). A random sample of 1,000 gives about the same precision whether the population is a town of 100,000 or a country of 300 million. What matters is how much data you have, provided the sampling is random. The only exception is the correction below when the sample is a large fraction of a small population.
The finite population correction
The formula \(\sigma/\sqrt{n}\) assumes the observations are independent, as they are when sampling with replacement or from a very large population. When sampling without replacement from a finite population of size \(N\), and the sample is a sizable fraction of it, the standard error is smaller:
\[\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}\sqrt{\frac{N-n}{N-1}}.\]The factor is essentially 1 when \(n/N \le 0.10\) (this is the 10 percent rule), so we usually ignore it.
Example 8.4: A sample that is 20 percent of the population
A company has \(N = 500\) employees with salary standard deviation \(\sigma = 15\) (in thousands). A random sample of \(n = 100\) is taken. Ignoring the correction, \(\sigma/\sqrt{n} = 1.5\). With it, \(1.5\sqrt{400/499} = 1.5 \times 0.8953 = 1.343\). The sample is 20 percent of the population, so it carries more information than an independent sample of 100 would, and the standard error is about 10 percent smaller.
Good estimators: bias and variability
A statistic used to estimate a parameter is an estimator. We judge estimators by their sampling distributions.
- Bias = (mean of the sampling distribution) minus (the true parameter). An estimator is unbiased if its bias is zero. \(\bar{x}\) is unbiased for \(\mu\), \(\hat{p}\) is unbiased for \(p\), and \(s^2\) (with \(n-1\)) is unbiased for \(\sigma^2\). (The \(n\)-denominator version is biased low, as the simulation in Chapter 3 showed.)
- Variability is the spread of the sampling distribution, measured by the standard error. Smaller is better.
- Consistency: the estimator gets closer to the parameter as \(n\) grows (bias and variance both go to zero).
Picture a target. Bias is when your shots are off center; variability is how scattered they are. An estimator can be unbiased but wildly variable (using only the first observation as an estimate of \(\mu\)), or biased but very precise. Ideally we want both small. Larger samples reduce variability; they do not reduce bias caused by a flawed sampling method (Chapter 2). A biased sample of a million is still biased.
The overall accuracy of an estimator is often summarized by the mean squared error, \(\text{MSE} = \text{bias}^2 + \text{variance}\), and its square root (the RMSE). Sometimes a slightly biased estimator has lower MSE than an unbiased one.
Going deeper: Why the CLT works, and a proof sketch that s squared is unbiased
Sketch of the CLT. Standardize each observation, \(Y_i = (X_i - \mu)/\sigma\), and consider \(S_n = (Y_1 + \cdots + Y_n)/\sqrt{n}\), which has mean 0 and variance 1 for every \(n\). Its moment generating function is \(M_Y(t/\sqrt{n})^n\). Expanding \(M_Y(u) = 1 + u^2/2 + o(u^2)\) (mean 0, variance 1) gives \(\left(1 + \frac{t^2}{2n} + o(1/n)\right)^n \to e^{t^2/2}\), the moment generating function of \(N(0,1)\). Only the mean and variance of the original distribution survive; all shape information is washed out. The next term in the expansion involves skewness and is of order \(1/\sqrt{n}\), which is why skewed populations converge more slowly.
Unbiasedness of \(s^2\). \(\sum (X_i - \bar{X})^2 = \sum (X_i - \mu)^2 - n(\bar{X} - \mu)^2\). Taking expectations, \(E\sum(X_i - \mu)^2 = n\sigma^2\) and \(E\,n(\bar{X}-\mu)^2 = n \cdot \sigma^2/n = \sigma^2\). So \(E\sum(X_i - \bar{X})^2 = (n-1)\sigma^2\), and dividing by \(n-1\) gives an unbiased estimator. Using \(\bar{X}\) in place of \(\mu\) makes deviations slightly too small, which the \(n-1\) repairs (one degree of freedom was spent estimating the mean).
Chapter summary
- A statistic is random; its distribution over repeated samples is the sampling distribution. Describe it by center, spread (standard error), and shape.
- \(\mu_{\bar{x}} = \mu\), \(\sigma_{\bar{x}} = \sigma/\sqrt{n}\). Quadruple \(n\) to halve the standard error.
- If the population is normal, \(\bar{x}\) is normal for all \(n\). CLT: for any population with finite variance, \(\bar{x}\) is approximately normal for large \(n\); skewed populations need larger \(n\).
- \(\mu_{\hat{p}} = p\), \(\sigma_{\hat{p}} = \sqrt{p(1-p)/n}\); normal if \(np \ge 10\) and \(n(1-p) \ge 10\).
- Independence: random sample and \(n < 10\%\) of the population; otherwise apply \(\sqrt{(N-n)/(N-1)}\).
- Bias (systematic error) versus variability (random error). Larger \(n\) reduces variability, not bias. MSE = bias\(^2\) + variance.
- Probabilities about \(\bar{x}\): \(z = (\bar{x} - \mu)/(\sigma/\sqrt{n})\), not \(z = (\bar{x} - \mu)/\sigma\).
Key terms
| Term | Meaning |
|---|---|
| Sampling distribution | Distribution of a statistic over all possible samples of a given size |
| Standard error | Standard deviation of a statistic's sampling distribution |
| Central limit theorem | The sampling distribution of \(\bar{x}\) is approximately normal for large \(n\) |
| Unbiased estimator | An estimator whose sampling distribution is centered at the parameter |
| Success-failure condition | \(np \ge 10\) and \(n(1-p) \ge 10\): normal approximation for \(\hat{p}\) |
| Finite population correction | \(\sqrt{(N-n)/(N-1)}\), applied when sampling a large fraction of a small population |
| MSE | Mean squared error, bias squared plus variance |