Explanation

Estimation and confidence intervals

Inferential statistics estimates a population parameter from a sample. A point estimate is a single number computed from the sample (x̄ for μ, p̂ for p, s for σ). It is almost certainly not exactly right, so we report an interval estimate, a confidence interval (CI), built as

point estimate ± margin of error,

where the margin of error is the error bound (EBM for a mean). The interval depends on the confidence level, on what is known about the distribution, and on the sample and its size.

The confidence level (CL, e.g. 90%, 95%, 99%) is the percent of all possible samples that can be expected to produce an interval that captures the true parameter. In the textbook's phrase, with CL = 90%, about 90 out of 100 such intervals will enclose the true parameter. Once an interval is computed the parameter is either inside it or not; the confidence is in the method. Facts about width:

  • Higher confidence level → larger margin of error → wider interval.
  • Larger sample size → smaller margin of error → narrower interval.
  • Larger variability (σ or s) → wider interval.

Working backward: the margin of error is half the interval width, and the sample mean is the midpoint of the two bounds.

CI for a mean when σ is known

By the CLT, x̄ is (approximately) normal with standard error σ/√n. The interval is x̄ ± z·(σ/√n), where z cuts off the required middle area (1.645 for 90%, 1.96 for 95%, 2.576 for 99%). Conditions: simple random sample, and a normal population or a large sample.

CI for a mean when σ is unknown

In practice σ is rarely known, so we substitute the sample standard deviation s. That introduces extra uncertainty, so the standardized statistic follows Student's t distribution (discovered by William Gosset, "Student", in 1908). Properties of the t distribution:

  • Continuous, symmetric about 0, bell-shaped, but flatter and with heavier tails than the standard normal.
  • A family determined by degrees of freedom df = n − 1 (the number of values free to vary once the mean is known).
  • Approaches the standard normal as n gets larger.

Interval: x̄ ± t·(s/√n) using t with df = n − 1. The population should be approximately normal unless n is large; always check for strong skewness or outliers in small samples.

CI for a population proportion

Use p̂ = x/n and the interval p̂ ± z*·√(p̂(1 − p̂)/n). The normal approximation is justified when n·p̂ and n·(1 − p̂) are both large enough (the textbook uses at least 5; many use 10). Report as a percent if the problem is phrased that way.

Choosing the sample size

Researchers often choose n in advance so that the margin of error stays below a stated value E. Solving the margin-of-error formula for n:

  • Mean: n = (z*·σ/E)².
  • Proportion: n = z*²·p(1 − p)/E². If there is no prior estimate of p, use p = 0.5, which makes p(1 − p) largest and therefore guarantees enough data.

Always round up to the next whole number, because rounding down would give a margin larger than requested.

Which interval do I need?

Ask in order: Is the parameter a mean or a proportion? If a mean, is σ known (z) or only s (t)? That decides the critical value and the standard error. Hypothesis tests in Week 9 follow exactly the same decision.

Common mistakes

Interpreting the CI as "95% of individuals fall inside"; using z when only s is available; using df = n instead of n − 1; rounding the sample size to the nearest instead of up; reading the confidence level as the probability that the parameter lies in a particular computed interval.

Practice tasks

  1. State z* for 90%, 95%, and 99% confidence.
  2. x̄ = 80, σ = 10, n = 25. Build a 95% CI for μ.
  3. x̄ = 50, s = 8, n = 16 (t* = 2.131 for df = 15). Build a 95% CI.
  4. 120 of 300 voters support a measure. Build a 95% CI for the proportion.
  5. How large a sample estimates a mean to within 3 units, σ = 15, 95% confidence?
  6. How large a sample estimates a proportion to within 0.03 at 95% confidence with no prior estimate?
  7. Does a 99% interval come out wider or narrower than a 90% interval from the same data? Interpret a 95% CI of (45.7, 54.3) correctly and say what an incorrect interpretation would be.