07 Confidence Intervals

Learn how confidence intervals quantify uncertainty, how to select the correct interval formula, how to plan sample sizes, and how to check assumptions and interpretations.

From point estimates to intervals

A combines a sample-based estimate with information about how much that estimate may vary across random samples.

The basic structure

A has the form

confidence interval=point estimate±margin of error.\text{confidence interval}=\text{point estimate}\pm\text{margin of error}.

The identifies the center of the interval, while the determines how far the endpoints extend from that center. For example, a sample mean estimates a population mean, but another random sample would usually produce a different sample mean. An interval communicates this uncertainty more fully than a single number.

A is a single sample statistic used to estimate a population parameter:

  • The sample mean xˉ\bar{x} estimates the population mean μ\mu.

  • The sample proportion p^=x/n\hat{p}=x/n estimates the population proportion pp.

  • The sample standard deviation ss estimates the population standard deviation σ\sigma.

Takeaway: A gives the best single-number estimate from the sample; a adds a range that reflects sampling uncertainty.

Confidence levels and critical values

The describes the long-run performance of an interval-producing method. If the same population were sampled repeatedly and the same method were applied each time, approximately the chosen percentage of the resulting intervals would contain the true parameter.

For a of 1−α1-\alpha, α\alpha is the total probability placed in the two tails of the sampling distribution. Common standard-normal critical values are:

  • 90%90\% confidence: α=0.10\alpha=0.10 and z∗=1.645z^*=1.645.

  • 95%95\% confidence: α=0.05\alpha=0.05 and z∗=1.960z^*=1.960.

  • 99%99\% confidence: α=0.01\alpha=0.01 and z∗=2.576z^*=2.576.

A 95%95\% confidence procedure does not mean that a particular completed interval has a 95%95\% probability of containing the fixed parameter. After the interval is calculated, it either contains the parameter or it does not. The 95%95\% describes the success rate of the method over repeated samples.

Holding sample size and variability constant, increasing the increases the critical value and makes the interval wider.

Takeaway: Higher confidence provides a more reliable long-run procedure but requires a wider interval.

How interval width is determined

The is the distance between the and either endpoint of a symmetric interval. It is determined by the critical value and the standard error:

margin of error=critical value×standard error.\text{margin of error}=\text{critical value}\times\text{standard error}.

Thus, the interval can be written as

point estimate±margin of error.\text{point estimate}\pm\text{margin of error}.

For many estimators, the standard error decreases in proportion to 1/n1/\sqrt{n}. This has an important planning consequence: reducing the by half generally requires about four times as many observations.

The tends to decrease when:

  • the sample size increases;

  • population variability decreases; or

  • a lower is selected.

Do not confuse the with the full interval width. If the is EE, the width of a symmetric interval is 2E2E.

Takeaway: Sample size controls precision through a square-root relationship, while and variability also affect interval width.

Intervals for a population mean

For a population mean, the correct formula depends on whether the population standard deviation σ\sigma is known.

Known population standard deviation

When σ\sigma is known, use

xˉ±z∗σn.\bar{x}\pm z^*\frac{\sigma}{\sqrt{n}}.

The is

E=z∗σn.E=z^*\frac{\sigma}{\sqrt{n}}.

This method requires independent observations and an approximately normal sampling distribution for the mean. A normally distributed population makes the method exact; for large samples, the Central Limit Theorem often supports the normal approximation.

Unknown population standard deviation

When σ\sigma is unknown, replace it with the sample standard deviation ss and use the :

xˉ±t∗sn.\bar{x}\pm t^*\frac{s}{\sqrt{n}}.

The degrees of freedom are

df=n−1.df=n-1.

The heavier tails of the account for the additional uncertainty caused by estimating σ\sigma. As nn increases, the becomes increasingly similar to the standard normal distribution.

Worked example

Suppose n=64n=64, xˉ=72\bar{x}=72, and s=8s=8. For a 95%95\% interval with df=63df=63, take t∗≈2.000t^*\approx2.000. Then

ME=2.000(864)=2.\text{ME}=2.000\left(\frac{8}{\sqrt{64}}\right)=2.

Therefore,

72±2=(70,74).72\pm2=(70,74).

The appropriate interpretation is: using this sampling method, a 95%95\% for the population mean is from 7070 to 7474 units.

Takeaway: Use z∗z^* when the population standard deviation is known; use t∗t^* with n−1n-1 degrees of freedom when it is unknown.

Intervals for a population proportion

A population proportion pp is estimated by the sample proportion

p^=xn,\hat{p}=\frac{x}{n},

where xx is the number of successes and nn is the sample size. For a sufficiently large sample, the introductory normal-approximation interval is

p^±z∗p^(1−p^)n.\hat{p}\pm z^*\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}.

Its is

E=z∗p^(1−p^)n.E=z^*\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}.

The approximation is most reliable when the expected numbers of successes and failures are both adequately large. For small samples or proportions near 00 or 11, a Wilson or exact binomial interval is generally preferable to the simple symmetric normal interval.

Worked example

In a random sample of 400400 voters, 240240 support a proposal. The sample proportion is

p^=240400=0.60.\hat{p}=\frac{240}{400}=0.60.

Using z∗=1.96z^*=1.96 for a 95%95\% interval,

ME=1.960.60(0.40)400≈0.048.\text{ME}=1.96\sqrt{\frac{0.60(0.40)}{400}}\approx0.048.

The interval is

0.60±0.048=(0.552,0.648).0.60\pm0.048=(0.552,0.648).

Thus, the estimated population proportion is 60%60\%, and the approximate 95%95\% interval extends from 55.2%55.2\% to 64.8%64.8\%.

Takeaway: Check the success and failure counts before relying on the normal approximation for a proportion.

Planning sample size

Sample size must be planned before data collection by specifying the , the largest acceptable , and an estimate of population variability. Always round the result up, because rounding down could make the actual larger than requested.

Planning for a mean

When a planning value for the population standard deviation is available, use

n=(z∗σE)2.n=\left(\frac{z^*\sigma}{E}\right)^2.

For example, with 95%95\% confidence, E=3E=3, and σ=12\sigma=12,

n=(1.96(12)3)2=61.47.n=\left(\frac{1.96(12)}{3}\right)^2=61.47.

Rounding up gives n=62n=62.

Planning for a proportion

With a prior planning estimate p∗p^*, use

n=(z∗)2p∗(1−p∗)E2.n=\frac{(z^*)^2p^*(1-p^*)}{E^2}.

If no prior estimate is available, use p∗=0.50p^*=0.50. This is conservative because p(1−p)p(1-p) is largest at p=0.50p=0.50, producing the largest required sample size.

For 95%95\% confidence and E=0.03E=0.03 with no prior estimate,

n=(1.96)2(0.50)(0.50)(0.03)2≈1067.11.n=\frac{(1.96)^2(0.50)(0.50)}{(0.03)^2}\approx1067.11.

Rounding up gives n=1068n=1068.

When sampling without replacement from a relatively small, known population, a can reduce the required sample size:

nadjusted=n01+n0−1N.n_{\text{adjusted}}=\frac{n_0}{1+\frac{n_0-1}{N}}.

Here, n0n_0 is the sample size calculated as if the population were very large, and NN is the population size.

Takeaway: Set the desired precision first, calculate the required size, and round up.

Assumptions and error checks

Before interpreting an interval, verify that the method matches the design and data.

Conditions to check

  • Randomness: The sample should reasonably represent the target population.

  • Independence: Observations should be independent, or the sampling design must account for dependence.

  • Distributional conditions: The normal or t-based method should be appropriate for the sample size and population shape.

  • Proportion counts: A normal approximation should not be used automatically when success or failure counts are very small.

  • Target parameter: An interval for a mean estimates a population mean, not the range of individual observations.

Frequent interpretation and calculation errors

  1. Treating a 95%95\% as a 95%95\% probability for one fixed interval.

  2. Using z∗z^* when σ\sigma is unknown and the sample is small, instead of using t∗t^*.

  3. Rounding a required sample size down.

  4. Confusing the with the full interval width.

  5. Assuming that a higher produces a narrower interval.

A useful final check is to identify the parameter, the , the critical value, the standard error, and the assumptions supporting the method. Together, these determine whether the interval is both numerically correct and appropriately interpreted.

Final takeaway: A is meaningful only when its sampling method, formula, assumptions, and interpretation all agree.