Unit 5, lesson 30

Standard Deviation and Standard Error

How the standard error describes the variability of a statistic over repeated samples, how the standard error of the mean and its estimate depend on sample size, and how cluster dependence lowers the effective sample size.

  • Video 30
  • Sampling Distributions

Individual measurements from a constructed process vary with a standard deviation of 12 units. The mean of 100 independent measurements from the same process varies from sample to sample with a standard deviation of only 1.2 units. Both numbers describe spread, but the spread of different things, and reporting one in place of the other makes an estimate look far more or far less certain than it is. This lesson defines the standard error, shows where the square root of the sample size comes from, and explains how estimating σ\sigma and how dependence between observations change the calculation.

Key terms

Standard error

Definition The standard error of a statistic is the standard deviation of its sampling distribution, for a stated population, sample size and sampling design. It is written SE⁡\operatorname{SE} and has the same units as the statistic. A standard deviation without further qualification describes a distribution of individual values, such as the population distribution or the values in one data set.

In plain words The standard deviation measures how widely individual observations spread around their mean. The standard error measures how much a summary would change if the whole study were repeated in the same way. Both are standard deviations, but of different distributions.

Example Take a population of three cards labeled 00, 22 and 44. One randomly drawn card has standard deviation σ=8/3≈1.63\sigma = \sqrt{8/3} \approx 1.63. The mean of two cards drawn at random with replacement has a sampling distribution with variance 4/34/3, so the standard error of that mean is 4/3≈1.15\sqrt{4/3} \approx 1.15. The proportion of cards labeled 44 in the same samples has a sampling distribution with variance 1/91/9, so its standard error is 1/31/3. Each statistic has its own standard error.

Standard error of the mean

Definition Let X1,…,XnX_1, \dots, X_n be independent and identically distributed with mean μ\mu and finite standard deviation σ\sigma. Independence makes the variances add, so the sum has variance nσ2n\sigma^2, and dividing the sum by nn divides its variance by n2n^2. Hence

Var⁡(Xˉ)=nσ2n2=σ2n,SE⁡(Xˉ)=σn.\begin{gathered} \operatorname{Var}(\bar{X}) = \frac{n\sigma^2}{n^2} = \frac{\sigma^2}{n}, \\[0.4em] \operatorname{SE}(\bar{X}) = \frac{\sigma}{\sqrt{n}} . \end{gathered}

For a simple random sample of nn units drawn without replacement from a population of N≥2N \ge 2 units, the draws are in general not independent. With the population variance σ2\sigma^2 defined with denominator NN, the standard error is then

SE⁡(Xˉ)=σnN−nN−1,\operatorname{SE}(\bar{X}) = \frac{\sigma}{\sqrt{n}}\sqrt{\frac{N - n}{N - 1}} ,

and with S2S^2 defined with denominator N−1N - 1 the same value is (S2/n)(1−n/N)\sqrt{(S^2/n)(1 - n/N)}.

In plain words For independent observations with a common standard deviation, the standard error of the mean shrinks like one over the square root of the sample size. Quadrupling nn halves it, and doubling nn divides it only by 2≈1.41\sqrt{2} \approx 1.41. The standard deviation σ\sigma of individual observations does not depend on nn at all. A larger sample makes the average more precise, not the process more consistent, and the formula assumes that the data are collected in the same way at every sample size.

Example A constructed process has σ=12\sigma = 12 units, and its measurements are independent. With n=25n = 25 the standard error of the mean is 12/25=2.412/\sqrt{25} = 2.4 units, and with n=100n = 100 it is 12/10=1.212/10 = 1.2 units, while single measurements have standard deviation 1212 units in both cases. To make the standard error at most 11 unit, solve 12/n≤112/\sqrt{n} \le 1, which gives n≥144n \ge 144. If instead the 100100 units are drawn without replacement from a finite population of N=200N = 200 units with σ=12\sigma = 12, computed with denominator NN, the standard error in units is

12100100199≈0.851.\frac{12}{\sqrt{100}}\sqrt{\frac{100}{199}} \approx 0.851 .

It is smaller than 1.21.2 because half of the population has been measured.

Estimated standard error

Definition When σ\sigma is unknown, it is replaced by the sample standard deviation

s=1n−1∑i=1n(xi−xˉ)2,s = \sqrt{\frac{1}{n - 1}\sum_{i=1}^{n}(x_i - \bar{x})^2} ,

which needs n≥2n \ge 2. For independent observations, the estimated standard error of the mean is SE⁡^(Xˉ)=s/n\widehat{\operatorname{SE}}(\bar{X}) = s/\sqrt{n}. It is a statistic computed from the same sample, so it has its own sampling distribution and in general changes from sample to sample. It estimates SE⁡(Xˉ)\operatorname{SE}(\bar{X}) and is generally not equal to it. For a sample proportion the usual estimate is p^(1−p^)/n\sqrt{\hat{p}(1 - \hat{p})/n}. Under simple random sampling without replacement, where s2s^2 estimates S2S^2, the estimate for the mean becomes (s2/n)(1−n/N)\sqrt{(s^2/n)(1 - n/N)}.

In plain words The estimated standard error is a sample-based estimate of how much the mean moves between samples. A sample that happens to show little variation gives a small estimate even when the population is more variable. Later procedures, such as the t interval, account for this extra uncertainty under stated conditions.

Example Twenty-five constructed measurements have sample standard deviation s=10s = 10 units. Their estimated standard error of the mean is 10/25=210/\sqrt{25} = 2 units. That number estimates how much the sample mean would vary over repeated samples. It does not say that the true standard error is exactly 22, and it does not say that most single measurements lie within 22 units of the mean, since their sample standard deviation is 1010. An error bar on a graph should state whether it shows a standard deviation, a standard error or an interval.

Cluster dependence

Definition Data have cluster dependence when the observations come in groups, such as several readings from one device, several pupils in one class or repeated measurements of one person, and observations in the same group are correlated while different groups are independent. The variance of a sum then includes covariance terms,

Var⁡(∑iXi)=∑iVar⁡(Xi)+∑i≠jCov⁡(Xi,Xj).\begin{aligned} &\operatorname{Var}\Bigl(\sum_{i} X_i\Bigr) = \sum_{i} \operatorname{Var}(X_i) \\[0.4em] &\quad + \sum_{i \ne j} \operatorname{Cov}(X_i, X_j) . \end{aligned}

A simple model has kk clusters of mm observations each, so n=kmn = km, with every observation having variance σ2\sigma^2 and every two observations in the same cluster having correlation ρ\rho. Then

Var⁡(Xˉ)=D σ2n,D=1+(m−1)ρ.\begin{gathered} \operatorname{Var}(\bar{X}) = D\,\frac{\sigma^2}{n}, \\[0.4em] D = 1 + (m - 1)\rho . \end{gathered}

The factor DD is the design effect of this model. When m≥2m \ge 2 and ρ>0\rho > 0 it exceeds 11, and the standard error of the mean is larger than σ/n\sigma/\sqrt{n}.

In plain words Ten readings from one device partly repeat the same information, because they share whatever is particular to that device. When readings within a cluster are positively correlated, a formula that treats every row as independent understates the uncertainty of the mean.

Example One hundred readings come from ten devices, ten readings each, with σ=12\sigma = 12 units and within-device correlation ρ=0.2\rho = 0.2 in the model above. The design effect is D=1+9⋅0.2=2.8D = 1 + 9 \cdot 0.2 = 2.8, so

SE⁡(Xˉ)=122.8100≈2.008\operatorname{SE}(\bar{X}) = 12\sqrt{\frac{2.8}{100}} \approx 2.008

units, compared with 1.21.2 units if all 100100 readings were independent.

Effective sample size

Definition For a mean of nn dependent observations, each with variance σ2\sigma^2, the effective sample size is the number of independent observations with the same variance that would give the mean the same variance,

neff=σ2Var⁡(Xˉ).n_{\text{eff}} = \frac{\sigma^2}{\operatorname{Var}(\bar{X})} .

In the equal-cluster model it equals n/D=n/(1+(m−1)ρ)n/D = n/\bigl(1 + (m - 1)\rho\bigr). It describes precision under a specific model. It is not a count of actual units, and it need not be a whole number.

In plain words Effective sample size converts dependent data into the number of independent observations they are worth for estimating the mean. In the equal-cluster model with a correlation between 00 and 11, it lies between the number of clusters and the number of rows.

Example For the hundred readings from ten devices, neff=100/2.8≈35.7n_{\text{eff}} = 100/2.8 \approx 35.7, and 12/100/2.8≈2.00812\big/\sqrt{100/2.8} \approx 2.008 units reproduces the standard error above. If the readings from each device were identical, so that ρ=1\rho = 1, then D=10D = 10 and neff=10n_{\text{eff}} = 10, the number of devices. If they were uncorrelated, neffn_{\text{eff}} would be 100100. Other dependence structures, such as serial correlation in a time series, need their own models.

Check yourself

  1. A process has standard deviation σ=18\sigma = 18 units, and its measurements are independent. Find the standard error of the mean for n=9n = 9 and for n=36n = 36, and the smallest sample size that makes it at most 22 units.
Show the answer

The standard errors are 18/9=618/\sqrt{9} = 6 units and 18/36=318/\sqrt{36} = 3 units, so quadrupling the sample size halves the standard error. The condition 18/n≤218/\sqrt{n} \le 2 means n≥9\sqrt{n} \ge 9, so n≥81n \ge 81. Individual measurements keep standard deviation 1818 units at every sample size.

  1. A report on 1616 independent measurements gives a mean of 5050 units and a sample standard deviation of s=8s = 8 units, and then says that a typical measurement lies within about 22 units of the mean. Where does the 22 come from, and what is wrong with the sentence?
Show the answer

The number 22 is the estimated standard error of the mean, 8/16=28/\sqrt{16} = 2 units. It estimates how much the sample mean would vary over repeated samples of 1616 measurements.

The spread of individual measurements is described by the sample standard deviation, 88 units, four times as large. A correct report says that individual measurements have a sample standard deviation of 88 units and that the mean of 5050 units has an estimated standard error of 22 units.

  1. A researcher measures the same five people ten times each and treats the 5050 readings as 5050 independent people. In a model where every reading has variance σ2\sigma^2, two readings of the same person have correlation 0.50.5, and different people are independent, compare the standard error of the mean with that from 5050 independent people measured once each. What happens if each of the five people is measured 100100 times instead?
Show the answer

For five people with ten readings each, m=10m = 10 and ρ=0.5\rho = 0.5, so D=1+9⋅0.5=5.5D = 1 + 9 \cdot 0.5 = 5.5. The standard error is σ5.5/50≈0.332 σ\sigma\sqrt{5.5/50} \approx 0.332\,\sigma, and the effective sample size is 50/5.5≈9.0950/5.5 \approx 9.09. Fifty independent people give σ/50≈0.141 σ\sigma/\sqrt{50} \approx 0.141\,\sigma, smaller by a factor of 5.5≈2.35\sqrt{5.5} \approx 2.35. Treating the 5050 rows as 5050 people would report 0.141 σ0.141\,\sigma and understate the uncertainty.

With mm readings per person the effective sample size is

5m1+0.5(m−1)=10mm+1,\frac{5m}{1 + 0.5(m - 1)} = \frac{10m}{m + 1},

which is about 9.909.90 at m=100m = 100 and stays below 1010 for every mm. Repeated readings can reduce measurement noise for each person, but in this model they never make five people worth more than ten independent people.

How this lesson connects