Sampling error, standard error, and margin of error
A height survey of male university students · One example, three concepts, explained step by step
Why might the sample mean differ from the population mean?
Part 1 · One sample
The university has 20,000 students. We want to estimate the mean height of all male students at the university. Suppose the true mean of the simulated population is μ = 172 cm, with population standard deviation σ = 6 cm.
- Population mean μ
- Current sample mean x̄
- Sampling error e
Current sample meanNo sample drawn yet
The actual deviation appears after sampling.
Expressing sampling error
This section expresses a sample's sampling error as a signed difference; its absolute value measures the size of the deviation.
Repeated sampling
Try it
How does sampling error fluctuate?
Part 2 · Repeated sampling
If we keep drawing independent random samples from the same population, the sample mean may differ each time. The standard error measures the typical variability of sample means under repeated sampling: it is the standard deviation of the sample mean's sampling distribution.
- Theoretical standard error
- 0.600 cm
- Samples simulated
- Samples: 0
- Empirical standard deviation of sample means
- —
- Sample means
- μ ± σ/√n
- Theoretical sampling distribution N(μ, σ²/n)
- Population mean μ
Proportion within μ ± σ/√n: —
Calculating the standard error
Under independent and identically distributed sampling; σ = 6 cm
Substitute: 6 ÷ √100 = 0.600 cm
Note: the standard error is neither the actual error in each sample nor a simple arithmetic mean of the errors.
Construct an interval
Try it
How much deviation do we allow when constructing an interval estimate?
Part 3 · Construct an interval
The researcher first chooses the desired confidence level (such as 90%, 95%, or 99%). This determines how far the interval extends on either side: the margin of error Δ. A higher confidence level usually requires a wider interval.
- Sample mean
- 172.63 cm
- Standard error
- 0.600 cm
- Coefficient k (determined by confidence level)
- 1.9600
- Margin of error
- Δ = 1.176 cm
95% confidence interval[171.45, 173.81] cm
- x̄ ± Δ
- Sample mean
- Population mean μ
This interval covers the population mean μ = 172 cm.
Margin of error and the interval
k is a coefficient determined by the selected confidence level; the source and calculation of z values will be explained in detail in later lessons
Substitute: 1.9600 × 6 ÷ √100 = 1.176 cm
Interval estimate = point estimate ± margin of error
Class discussion: if we increase the confidence level from 90% to 99% to seek greater coverage, should the interval become wider or narrower?
Conclusion: Other conditions being equal, a higher confidence level gives a larger margin of error and a wider interval.
Three concepts in one sentence
Sampling error is the difference between a particular sample estimate and the true value; standard error measures typical variability under repeated sampling; margin of error is the half-width used to construct an interval at a given confidence level.
Note: we choose the confidence level in advance, but Δ is not arbitrary: it also depends on sample size and standard error. The margin does not guarantee that every actual sampling error stays within Δ; at a 95% confidence level, about 5% of intervals miss the true value in the long run.