2026-02-10

What is Interval Estimation?

Interval estimation gives us a range of plausible values for an unknown population parameter.

  • It is based on a sample statistic plus a margin of error.
  • General structure:

\[ \text{estimate} \;\pm\; \text{margin of error} \]

  • Why we use it:
    • Samples vary, so point estimates alone can be misleading
    • Intervals communicate uncertainty and precision

Confidence Level

A 95% confidence interval means: - If we repeated the sampling provess many times, about 95% of the intervals we build would contain the true parameter.

It is important to know that it does not mean that there is a 95% chance μ is in this interval.

Confidence Interval for the Mean

When the population standard deviation \(\sigma\) is unknown (most common), a \(100(1-\alpha)\%\) confidence interval for the mean \(\mu\) is:

\[ \bar{x} \pm t^{\*}_{\alpha/2,\;n-1}\left(\frac{s}{\sqrt{n}}\right) \]

Where: - \(\bar{x}\) = sample mean
- \(s\) = sample standard deviation
- \(n\) = sample size
- \(t^{\*}_{\alpha/2,\;n-1}\) = t critical value with \(n-1\) degrees of freedom

How Confidence Interval Width Changes

What makes confidence intervals narrower?

  • Larger sample size \(n\): the standard error \(\dfrac{s}{\sqrt{n}}\) gets smaller
  • Lower confidence level: smaller critical value (\(t^*\) or \(z^*\))
  • Smaller variability \(s\): less spread in the data

Tradeoff: - Higher confidence \(\Rightarrow\) wider interval - More data \(\Rightarrow\) narrower interval

Line Plot Representation

This line graph shows how the width of the confidence interval changes as the sample size increases. We see a drastic drop as soon as we add more sample size.

Confidence Interval Width Tradeoff

This 3D surface shows how confidence interval width depends on:

  • Sample size
  • Confidence Level
  • Confidence Interval Width

Example: Confidence Interval for a Mean

We’ll use ToothGrowth

  • Response: len(tooth length)
  • Suppose we take the OJ group only and build a Confidence Internval for its mean

Another Common Confidence Interval: Proportion

For a population proportion \(p\), with sample proportion \(\hat{p}\), a \(100(1-\alpha)\%\) confidence interval is:

\[ \hat{p} \pm z^{*}_{\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \]

Rule of thumb for using this normal-approximation CI:

\[ n\hat{p} \ge 10 \quad \text{and} \quad n(1-\hat{p}) \ge 10 \]

df <- subset(ToothGrowth, supp == "OJ")

xbar <- mean(df$len)
s <- sd(df$len)
n <- nrow(df)

tstar <- qt(0.975, df = n - 1)
moe <- tstar * s / sqrt(n)

lower <- xbar - moe
upper <- xbar + moe

c(lower = lower, mean = xbar, upper = upper)
##    lower     mean    upper 
## 18.19678 20.66333 23.12989