Week 8.2: Confidence Intervals
528 words
3 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Week 8.2: Confidence Intervals > **Prerequisites:** Sampling Distributions ([Week 6.2: Sampling Distributions](/notes/01-foundation-bsma1004-stats-2-week06-19-sampling-distributions)), Properties ([Week 8.1: Properties of Estimators](/notes/01-foundation-bsma1004-stats-2-week08-22-properties-estimators)) > **Cross...

Week 8.2: Confidence Intervals
Prerequisites: Sampling Distributions (Week 6.2: Sampling Distributions), Properties (Week 8.1: Properties of Estimators) Cross-links: BSMA3012 (Linear Stat Models) — regression intervals Core question: How do we express uncertainty in our estimate with an interval?
1. Intuition: From Point to Interval
A point estimate θ^ alone tells us nothing about precision. A confidence interval (CI) gives a range of plausible values and quantifies uncertainty:
"We are 95% confident that μ lies in (Xˉ−1.96⋅SE,Xˉ+1.96⋅SE)." Interpretation: If we repeated the sampling many times and computed a 95% CI each time, 95% of those intervals would contain the true parameter θ. Crucial: The parameter is fixed (not random). The interval is random. "95% confidence" refers to the procedure, not the specific interval.
2. CI for Mean (Known Variance)
If X1,…,Xn∼N(μ,σ2) or n large (CLT):
A 100(1−α)% CI:
where zα/2 is the N(0,1) quantile with P(Z>zα/2)=α/2.
Common z values:
- 90% CI: z0.05=1.645
- 95% CI: z0.025=1.96
- 99% CI: z0.005=2.576
3. CI for Mean (Unknown Variance)
When σ is unknown, estimate with S and use t-distribution:
A 100(1−α)% CI:
Note: As n→∞, tα/2,n−1→zα/2, so the t and z intervals coincide for large n.
4. CI for Variance (Normal Data)
Using (n−1)S2/σ2∼χn−12:
A 100(1−α)% CI for σ2:
5. CI for Proportion (Large Sample)
For Xi∼Bernoulli(p) and large n:
Conditions: np^≥10 and n(1−p^)≥10.
6. Summary Table
| Parameter | CI | Distribution |
|---|---|---|
| μ (known σ ) | Xˉ±zα/2⋅nσ | N(0,1) |
| μ (unknown σ ) | Xˉ±tα/2,n−1⋅nS | tn−1 |
| σ2 | (χα/22(n−1)S2,χ1−α/22(n−1)S2) | χn−12 |
| p | p^±zα/2np^(1−p^) | N(0,1) approx |
7. Practice Questions
Q1 (Easy)
n=100, xˉ=50, σ=10. Find 95% CI for μ.
Full SolutionSE=10/100=1. z0.025=1.96.95% CI: 50±1.96⋅1=(48.04,51.96).
Q2 (Medium)
n=25, xˉ=100, s=15. Find 95% CI for μ.
Full SolutionSE=15/25=3. t0.025,24=2.064.95% CI: 100±2.064⋅3=(93.81,106.19).
Q3 (Hard)
From n=20 normal samples, s2=16. Find a 90% CI for σ2.
Full Solutionχ0.05,192=30.144, χ0.95,192=10.117.90% CI: (30.14419⋅16,10.11719⋅16)=(10.08,30.05).
Next topic: Week 9: Bayesian Estimation — Bayesian Estimation. Join Discord PreviousWeek 8.1: Properties of EstimatorsNextBayesian Estimation