🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
Search courses…
💼 Servicesℹ️ About✉️ ContactView Pricing Plansfrom $10

Confidence Intervals for the Mean — z and t Intervals

Foundations of StatisticsConfidence Intervals🟢 Free Lesson

Advertisement

Confidence Intervals for the Mean — z and t Intervals

Foundations of Statistics

Estimating Means with Precision

Confidence intervals provide a range of plausible values for the population mean, offering more information than point estimates alone. Choosing between z and t intervals depends on whether σ is known, a critical distinction in practice.

  • Clinical Trials — Estimating treatment effect sizes with quantified uncertainty
  • Business Planning — Forecasting average customer lifetime value with confidence bounds
  • Policy Analysis — Measuring intervention effects with appropriate uncertainty

Confidence intervals turn point estimates into informed decisions.


Core Concepts

A confidence interval gives a range of plausible values for the population mean μ\mu, based on sample data. The choice between z-interval and t-interval depends on whether σ\sigma is known.

DfConfidence Interval

A (1α)×100%(1-\alpha)\times 100\% confidence interval for μ\mu is an interval [L,U][L, U] computed from sample data such that P(LμU)=1αP(L \leq \mu \leq U) = 1-\alpha in repeated sampling. Equivalently, if we were to construct such intervals from infinitely many samples, (1α)×100%(1-\alpha)\times 100\% of them would contain the true μ\mu.

Correct Interpretation

A 95% CI does not mean "there is a 95% probability that μ\mu is in this interval." In the frequentist framework, μ\mu is a fixed (but unknown) constant — it is either in the interval or it is not. The 95% refers to the long-run coverage rate of the procedure, not to any single interval.


z-Interval (σ\sigma Known)

z-Interval (σ known)

xˉ±zα/2σn\bar{x} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}

Here,

  • xˉ\bar{x}=Sample mean
  • zα/2z_{\alpha/2}=Critical value from standard normal
  • σ\sigma=Known population standard deviation
  • nn=Sample size

ThDerivation of the z-Interval

Since XˉN(μ,σ2/n)\bar{X} \sim N(\mu, \sigma^2/n), we have Z=Xˉμσ/nN(0,1)Z = \frac{\bar{X} - \mu}{\sigma/\sqrt{n}} \sim N(0,1). The central (1α)(1-\alpha) region satisfies:

P(zα/2Zzα/2)=1αP(-z_{\alpha/2} \leq Z \leq z_{\alpha/2}) = 1 - \alpha

Substituting and rearranging:

P(Xˉzα/2σnμXˉ+zα/2σn)=1αP\left(\bar{X} - z_{\alpha/2}\frac{\sigma}{\sqrt{n}} \leq \mu \leq \bar{X} + z_{\alpha/2}\frac{\sigma}{\sqrt{n}}\right) = 1 - \alpha

t-Interval (σ\sigma Unknown)

t-Interval (σ unknown)

xˉ±tα/2,n1sn\bar{x} \pm t_{\alpha/2, n-1} \cdot \frac{s}{\sqrt{n}}

Here,

  • xˉ\bar{x}=Sample mean
  • tα/2,n1t_{\alpha/2, n-1}=Critical value from t-distribution with n-1 df
  • ss=Sample standard deviation
  • nn=Sample size

ThDerivation of the t-Interval

When σ\sigma is unknown, we replace it with ss. The statistic T=Xˉμs/ntn1T = \frac{\bar{X} - \mu}{s/\sqrt{n}} \sim t_{n-1} (by Fisher's theorem). The central region:

P(tα/2,n1Ttα/2,n1)=1αP(-t_{\alpha/2, n-1} \leq T \leq t_{\alpha/2, n-1}) = 1 - \alpha

Rearranging yields the interval xˉ±tα/2,n1s/n\bar{x} \pm t_{\alpha/2, n-1} \cdot s/\sqrt{n}. The t-interval is wider than the z-interval because tα/2,n1>zα/2t_{\alpha/2, n-1} > z_{\alpha/2} for finite nn.


Factors Affecting Width

Interval Width

The width of a confidence interval is 2×margin of error=2csn2 \times \text{margin of error} = 2 \cdot c \cdot \frac{s}{\sqrt{n}}, where cc is the critical value. The width depends on:

  1. Confidence level: higher confidence \to larger cc \to wider interval
  2. Sample size: larger nn \to smaller s/ns/\sqrt{n} \to narrower interval
  3. Variability: larger ss \to wider interval

Sample Size Formula

To achieve a margin of error EE at confidence level 1α1-\alpha:

n=(zα/2σE)2n = \left(\frac{z_{\alpha/2} \cdot \sigma}{E}\right)^2

For example, to estimate μ\mu within ±1\pm 1 unit with 95% confidence when σ=5\sigma = 5: n=(1.96×5/1)2=96.04n = (1.96 \times 5 / 1)^2 = 96.04, so n=97n = 97.


Worked Example: z-Interval

A factory produces bolts with known σ=0.5\sigma = 0.5 mm. A sample of n=36n = 36 bolts has xˉ=12.3\bar{x} = 12.3 mm. Construct a 95% CI for μ\mu.

Step 1. The critical value: z0.025=1.96z_{0.025} = 1.96.

Step 2. The standard error: SE=σ/n=0.5/6=0.0833\text{SE} = \sigma/\sqrt{n} = 0.5/6 = 0.0833.

Step 3. The margin of error: E=1.96×0.0833=0.163E = 1.96 \times 0.0833 = 0.163.

Step 4. The 95% CI: 12.3±0.163=(12.137,12.463)12.3 \pm 0.163 = (12.137, 12.463) mm.

Interpretation: We are 95% confident that the true mean bolt length is between 12.14 and 12.46 mm.


Worked Example: t-Interval

A pharmacologist measures drug half-life in n=9n = 9 patients: xˉ=4.2\bar{x} = 4.2 hours, s=0.8s = 0.8 hours. Construct a 95% CI for μ\mu.

Step 1. With ν=8\nu = 8 degrees of freedom: t0.025,8=2.306t_{0.025, 8} = 2.306.

Step 2. Standard error: SE=s/n=0.8/3=0.267\text{SE} = s/\sqrt{n} = 0.8/3 = 0.267.

Step 3. Margin of error: E=2.306×0.267=0.615E = 2.306 \times 0.267 = 0.615.

Step 4. The 95% CI: 4.2±0.615=(3.585,4.815)4.2 \pm 0.615 = (3.585, 4.815) hours.

Comparison: If we had (incorrectly) used the z-interval: 4.2±1.96×0.267=4.2±0.523=(3.677,4.723)4.2 \pm 1.96 \times 0.267 = 4.2 \pm 0.523 = (3.677, 4.723). The t-interval is wider, correctly reflecting the additional uncertainty from estimating σ\sigma with ss from only 9 observations.


Confidence Level and Coverage

Confidence Level Comparison

Confidence Levelzα/2z_{\alpha/2}t0.025,10t_{0.025, 10}Relative Width
90%1.6451.8121.00
95%1.9602.2281.22
99%2.5763.1691.75

Higher confidence requires wider intervals. The cost of being "more sure" is less precision.


Key Takeaways

Summary: Confidence Intervals for the Mean

  • z-interval (σ\sigma known): xˉ±zα/2σ/n\bar{x} \pm z_{\alpha/2} \cdot \sigma/\sqrt{n}
  • t-interval (σ\sigma unknown): xˉ±tα/2,n1s/n\bar{x} \pm t_{\alpha/2, n-1} \cdot s/\sqrt{n}
  • Higher confidence or smaller nn \to wider interval
  • Larger nn \to narrower interval (smaller SE)
  • Interpretation: "In repeated sampling, 95% of such intervals contain $\mu$"
  • For large nn, t-critical \approx z-critical, so the intervals are nearly identical

Premium Content

Confidence Intervals for the Mean — z and t Intervals

Unlock this lesson and 900+ advanced tutorials with a Premium plan.

🎯End-to-end Projects
💼Interview Prep
📜Certificates
🤝Community Access

Already a member? Log in

Need Expert Statistics Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement