Session 8.2.2 — Confidence Interval for the Mean \( \mu \) — σ unknown (t-interval)
Default in practice. Use sample SD \( s \) and \( t_{\nu,\alpha/2} \) with degrees of freedom \( \nu=n-1 \).
Why t instead of z?
When \( \sigma \) is unknown (usual), replacing it with sample SD \( s \) adds extra uncertainty, especially at small \(n\). The t distribution (heavier tails) corrects for this.
Interpretation: A \(100(1-\alpha)\%\) t-interval captures the fixed \( \mu \) in about \(100(1-\alpha)\%\) of repeated samples.
  How it works
      \[
        T=\frac{\bar X-\mu}{S/\sqrt{n}}\sim t_{\nu},\quad \nu=n-1
        \;\Rightarrow\; \boxed{\ \bar x \pm t_{\nu,\alpha/2}\frac{s}{\sqrt{n}}\ }.
      \]
    
    As \( n \) grows, \( t \to z \) and t- and z-intervals become the same.
Worked example (calculator + mini graph)
Type your numbers or pick a preset.
      Preset:
      
      
      
      
    
    t-CI:
—
Margin of error
—
SE \(=s/\sqrt{n}\)
—
df \(=\nu=n-1\)
—
t-critical
—
      Enter values and click Compute t-CI to see the step-by-step math here.
    
    Graph: dot = \( \bar x \); line = CI; tick marks = endpoints.
    Excel — quick steps (t-interval)
Alpha in B5 (e.g., 0.05 for 95%)
- B2 = x̄ (sample mean)
- B3 = s (sample SD)
- B4 = n (sample size)
- B5 = α (two-sided)
- B6 = df → =$B$4-1
- B7 = t-critical → =T.INV(1-$B$5/2,$B$6) or =T.INV.2T($B$5,$B$6)
- B8 = SE → =$B$3/SQRT($B$4)
- B9 = ME → =$B$7*$B$8
- B10 = Lower → =$B$2-$B$9
- B11 = Upper → =$B$2+$B$9
Confidence in B5 (e.g., 0.95)
- B2 = x̄, B3 = s, B4 = n
- B5 = confidence (decimal)
- B6 = α → =1-$B$5
- B7 = df → =$B$4-1
- B8 = t-critical → =T.INV(1-$B$6/2,$B$7)
- B9 = SE → =$B$3/SQRT($B$4)
- B10 = ME → =$B$8*$B$9
- B11 = Lower → =$B$2-$B$10
- B12 = Upper → =$B$2+$B$10
All-in-one formulas
- ME (α in B5): =T.INV(1-$B$5/2,$B$4-1)*$B$3/SQRT($B$4)
- ME (confidence in B5): =T.INV(1-(1-$B$5)/2,$B$4-1)*$B$3/SQRT($B$4)
- Lower/Upper (α in B5): =$B$2 - T.INV(1-$B$5/2,$B$4-1)*$B$3/SQRT($B$4), =$B$2 + T.INV(1-$B$5/2,$B$4-1)*$B$3/SQRT($B$4)
      Plan n (optional): First pass with z:
      =ROUNDUP((NORM.S.INV(1-(1-$B$5)/2)*$B$3/$B$11)^2,0) (target ME* in B11),
      then refine with t using that n:
      =ROUNDUP((T.INV(1-(1-$B$5)/2,$B$12-1)*$B$3/$B$11)^2,0).
    
  t vs z — quick compare (plain words)
      Bottom line: Use t when you don’t know the population SD \( \sigma \) (the usual case).
      Use z only when \( \sigma \) is truly known (rare) or for rough planning of sample size.
    
    What’s different?
- z-interval (σ known): \( \bar x \pm z_{\alpha/2}\,\dfrac{\sigma}{\sqrt{n}} \). Uses the standard normal. No degrees of freedom.
- t-interval (σ unknown): \( \bar x \pm t_{\nu,\alpha/2}\,\dfrac{s}{\sqrt{n}} \). Uses the t distribution with heavier tails.
- As \( n \) grows, t becomes almost the same as z (the heavier tails shrink).
What is “df” and how do I get it?
df stands for degrees of freedom. For a one-sample mean t-interval, \( \nu = n - 1 \). Example: if you sampled \( n=12 \) students, then \( \nu = 11 \).
How do I find the t-critical value?
- Pick confidence \(100(1-\alpha)\%\) (e.g., 95% ⇒ \( \alpha=0.05 \)).
- Compute df: \( \nu = n-1 \).
- From a t-table: use the row for df \(=\nu\) and the two-tailed column for \( \alpha \) (e.g., 0.05).
- In Excel/Sheets: =T.INV(1-α/2, ν) or =T.INV.2T(α, ν).
      Example (words only): Suppose \( \bar x=66,\ s=21,\ n=12,\) confidence 95%.
      Then \( \nu=11,\ t_{\nu,0.025}\approx 2.201,\ \mathrm{SE}=21/\sqrt{12}\approx 6.062,\ \mathrm{ME}\approx 13.33.\)
      CI: \(66 \pm 13.33 \Rightarrow [52.67,\ 79.33].\)