Lecture 12 - From Theory to Practice: z and t Distributions
2025-07-24
Confidence Intervals: From Theory to Practice
“A confidence interval is a way of expressing uncertainty in a precise, mathematical way”
When:
- 📅 Date: Friday, July 25
- ⏰ Window: 7 AM – 12 AM
- ⏳ Duration: 1 hour once started
Where: 💻 Online via Canvas
Covers: Material from Weeks 3-4
A confidence interval (CI) takes a single sample statistic and turns it into a range that is likely to contain an unknown population parameter; most often the mean \mu.
CI template
\underbrace{\text{Point estimate}}_{\color{blue}{(e.g., \bar{x})}} \;\pm\; \underbrace{\text{(critical value) $\times$ (standard error)}}_{\color{red}{\text{Margin of Error (ME)}}}
For the mean
Situation | Formula | Distribution |
---|---|---|
σ known (rare) | \displaystyle \bar{x} \;\pm\; z^{*}\,\frac{\sigma}{\sqrt{n}} | z-distribution |
σ unknown (typical) | \displaystyle \bar{x} \;\pm\; t^{*}\,\frac{s}{\sqrt{n}} | t-distribution (df = n-1) |
Key points
Key Formula: \bar{x} \pm z^* \cdot \frac{s}{\sqrt{n}} (when using z-distribution)
Research Question: What is the average SAT score of students at UCSB?
Given Information:
Question: Construct a 95\% confidence interval for the population mean SAT score.
Step 1: Check conditions
Step 2: Find critical value
Step 3: Calculate SE
SE = \frac{\sigma}{\sqrt{n}} = \frac{120}{\sqrt{50}} = \frac{120}{7.071} = 16.97
Step 4: Calculate Margin of Error
ME = z^* \times SE = 1.96 \times 16.97 = 33.26
Step 5: Construct CI
CI = \bar{x} \pm ME = 1180 \pm 33.26 = (1146.7, 1213.3)
Final Answer: We are 95% confident that the true average SAT score is between 1146.7 and 1213.3.
Research Question: What is the average daily coffee consumption at our office?
Given Information:
- Sample size: n = 16 employees
- Sample mean: \bar{x} = 2.8 cups
- Sample standard deviation: s = 0.9 (\sigma unknown)
- Confidence level: 90%
Question: Construct a 90% confidence interval for the population mean daily coffee consumption.
Step 1: Check conditions - \sigma is unknown ✓ - n < 30 ✓ - Use t-distribution ✓
Step 2: Calculate degrees of freedom - df = n - 1 = 16 - 1 = 15
Step 3: Find critical value - For 90% CI: \alpha = 0.10, \alpha/2 = 0.05 - t* = 1.753 (from t-table, df = 15)
Step 4: Calculate SE
SE = \frac{s}{\sqrt{n}} = \frac{0.9}{\sqrt{16}} = \frac{0.9}{4} = 0.225
Step 5: Calculate Margin of Error
ME = t^* \times SE = 1.753 \times 0.225 = 0.394
Step 6: Construct CI
CI = \bar{x} \pm ME = 2.8 \pm 0.394 = (2.406, 3.194)
Final Answer: We are 90% confident that the true average daily coffee consumption is between 2.406 and 3.194 cups.
Problem: A researcher wants to estimate the average time students spend studying per day.
Given:
Questions:
Step 1: Distribution Choice Use t-distribution because: - σ is unknown (only sample standard deviation s is given) - n = 25 < 30
Step 2: Degrees of Freedom df = n - 1 = 25 - 1 = 24
Step 3: Critical Value For 95% CI with df = 24: t* = 2.064
Step 4: Calculate CI
Standard Error: SE = \frac{s}{\sqrt{n}} = \frac{1.1}{\sqrt{25}} = \frac{1.1}{5} = 0.220
Margin of Error: ME = t^* \times SE = 2.064 \times 0.220 = 0.454
Confidence Interval: CI = \bar{x} \pm ME = 3.2 \pm 0.454 = (2.746, 3.654)
Step 5: Interpretation We are 95% confident that the true average study time for students is between 2.746 and 3.654 hours per day.
1. Distribution Choice - σ known → z-distribution - σ unknown + n ≥ 30 → z-distribution
- σ unknown + n < 30 → t-distribution
2. t-Distribution Properties - Heavier tails than z - Depends on degrees of freedom (df = n-1) - Approaches z as df increases
3. Critical Regions - α/2 in each tail for two-sided CI - Critical values from tables or software - Larger confidence → larger critical values
4. Calculation Steps 1. Check conditions (σ known?, sample size?) 2. Choose distribution (z or t) 3. Find critical value 4. Calculate standard error 5. Compute margin of error
6. Construct interval 7. Interpret in context
5. Interpretation - “We are C% confident…” - Focus on the process, not individual interval - Consider practical significance
6. Common Pitfalls to Avoid - Wrong distribution choice - Incorrect degrees of freedom - Using α instead of α/2 - Misinterpreting the interval
Confidence Intervals – z and t Distributions © 2025