Source: Walpole Ch. 9–10, Lecture Weeks 11–15
Tags: confidence interval, hypothesis test, t-test, z-test, p-value, significance level, type I error, type II error, null hypothesis, alternative hypothesis, point estimate, margin of error, STAT 3021, UMN
Difficulty: Intermediate to Advanced | Prerequisites: Sampling Distributions and CLT (Ch. 8), Normal Distribution (Ch. 6)
This is where everything in the course comes together. Chapters 9 and 10 cover statistical inference: using sample data to draw conclusions about population parameters. Chapter 9 focuses on estimation (confidence intervals), and Chapter 10 focuses on hypothesis testing. Both rely on the sampling distributions you studied in Chapter 8 and the normal/t-distributions from earlier. These two chapters make up the majority of Exam 3 and represent the practical payoff of the entire course: you are learning to answer questions like "What is the true average?" and "Is there evidence that this treatment works?"
A confidence interval gives a range of plausible values for a population parameter, with a stated level of confidence. A hypothesis test asks whether sample data provide enough evidence to reject a claim about a parameter. Both procedures use the same underlying sampling distributions, and the logic of one mirrors the other.
Point estimate
A single number used to estimate a population parameter. The sample mean X-bar estimates μ; the sample proportion p-hat estimates p. Think of it as your best single guess.
Confidence interval (CI)
An interval [lower, upper] constructed so that, in the long run, a specified proportion (e.g. 95%) of such intervals would contain the true parameter. In simple terms, it is a range that you are fairly confident contains the true value.
Confidence level (1 - α)
The probability that the interval procedure captures the true parameter across repeated sampling. A 95% confidence level means that if you constructed 100 intervals from 100 different samples, roughly 95 of them would contain the true value.
Margin of error (E)
Half the width of the confidence interval. It equals the critical value times the standard error. Larger samples and lower confidence levels produce smaller margins of error.
t-distribution
A family of distributions indexed by degrees of freedom (df). It resembles the standard normal but has heavier tails, which accounts for the extra uncertainty when σ is unknown and estimated by the sample standard deviation s. As df increases, the t-distribution approaches the standard normal.
Null hypothesis (H₀)
The default claim about a parameter, typically a statement of "no effect" or "no difference." It is assumed true until the data provide sufficient evidence against it.
Alternative hypothesis (H₁ or Hₐ)
The claim you are trying to find evidence for. It can be one-sided (μ > μ₀ or μ < μ₀) or two-sided (μ ≠ μ₀).
Test statistic
A standardised value computed from the sample data that measures how far the sample result is from what H₀ predicts. For means: Z or t. For proportions: Z.
P-value
The probability, assuming H₀ is true, of observing a test statistic as extreme as (or more extreme than) the one calculated. A small p-value means the data are unlikely under H₀. In simple terms, it measures the strength of evidence against the null.
Significance level (α)
The threshold for rejecting H₀, typically 0.05 or 0.01. If the p-value ≤ α, you reject H₀.
Type I error
Rejecting H₀ when it is actually true (a false positive). The probability of a Type I error equals α.
Type II error
Failing to reject H₀ when it is actually false (a false negative). Its probability is denoted β. Power = 1 - β.
When σ is known: CI = X-bar ± z_(α/2) × (σ / √n)
Use the standard normal z-table
Common z-values: z₀.₀₂₅ = 1.96 (95% CI), z₀.₀₀₅ = 2.576 (99% CI)
When σ is unknown (the usual case): CI = X-bar ± t_(α/2, n-1) × (s / √n)
Use the t-distribution with df = n - 1
s is the sample standard deviation
The t-value is always larger than the corresponding z-value, giving a wider interval
Interpretation: "We are 95% confident that the true population mean lies between [lower] and [upper]"
Increasing n narrows the interval; increasing confidence level widens it
Independent samples: CI for (μ₁ - μ₂) = (X-bar₁ - X-bar₂) ± t_(α/2, df) × SE
SE depends on whether population variances are assumed equal or unequal
Equal variances (pooled): SE = s_p × √(1/n₁ + 1/n₂), where s_p² is the pooled variance
Unequal variances (Welch's): SE = √(s₁²/n₁ + s₂²/n₂), with df from the Welch-Satterthwaite formula
If the CI for (μ₁ - μ₂) contains 0, there is no evidence of a difference between the means
Step 1: State H₀ (e.g. μ = μ₀) and H₁ (e.g. μ ≠ μ₀, μ > μ₀, or μ < μ₀)
Step 2: Choose significance level α
Step 3: Compute the test statistic
σ known: Z = (X-bar - μ₀) / (σ / √n)
σ unknown: t = (X-bar - μ₀) / (s / √n), df = n - 1
Step 4: Find the p-value or compare the test statistic to the critical value
Step 5: Make a decision. Reject H₀ if p-value ≤ α
Step 6: State the conclusion in context
Same five-step structure, but the test statistic compares two sample means
H₀: μ₁ - μ₂ = 0 (or some specified difference)
t = (X-bar₁ - X-bar₂) / SE, with SE and df as in the two-sample CI
One-sample: H₀: p = p₀. Test statistic Z = (p-hat - p₀) / √(p₀(1-p₀)/n)
Two-sample: H₀: p₁ = p₂. Use a pooled proportion p-hat_pool = (x₁ + x₂)/(n₁ + n₂)
Z = (p-hat₁ - p-hat₂) / √(p-hat_pool × (1 - p-hat_pool) × (1/n₁ + 1/n₂))
\text{CI for } \mu \text{ (}\sigma \text{ known):} \quad \bar{X} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}\text{CI for } \mu \text{ (}\sigma \text{ unknown):} \quad \bar{X} \pm t_{\alpha/2,\, n-1} \cdot \frac{s}{\sqrt{n}}t = \frac{\bar{X} - \mu_0}{s / \sqrt{n}}Z = \frac{\hat{p} - p_0}{\sqrt{p_0(1-p_0)/n}}Confidence intervals are reported in virtually every scientific study and newspaper poll ("the margin of error is ± 3 percentage points" is a confidence interval in disguise). Hypothesis testing is the standard framework for clinical trials: a new drug is tested against a placebo, and the result is judged by whether the p-value falls below a significance threshold. In R, the t.test() function performs these calculations directly.
A 95% confidence interval does not mean there is a 95% probability that the true parameter is in this particular interval. The parameter is fixed; the interval is random. The 95% refers to the procedure's long-run success rate.
"Failing to reject H₀" does not mean H₀ is true. It means the data did not provide enough evidence to reject it. Absence of evidence is not evidence of absence.
Students often confuse the p-value with the probability that H₀ is true. The p-value is the probability of the observed data (or more extreme) given that H₀ is true. It is a statement about the data, not about H₀.
Using a z-test when σ is unknown is a common error. If σ is estimated by s, use the t-distribution.
⚠️ Exam 3 is heavily weighted toward confidence intervals and hypothesis tests. Know the formulas and the step-by-step procedure cold.
⚠️ You will need to choose between z and t. The rule: if σ is known, use z. If σ is unknown and estimated by s, use t.
⚠️ Interpretation questions are common. Practise writing a one-sentence conclusion in context (e.g. "At the 5% significance level, there is sufficient evidence to conclude that the mean weight exceeds 500g").
⚠️ For your cheat sheet: write down the CI formulas, the t-test statistic, common z-values (1.645, 1.96, 2.576), and the five-step hypothesis testing procedure.
True or False: A 99% confidence interval is narrower than a 95% confidence interval for the same data. (False. Higher confidence requires a wider interval.)
Fill in the blank: If the p-value is 0.03 and α = 0.05, we ___ H₀. (Reject)
True or False: A Type I error occurs when we fail to reject a false H₀. (False. That is a Type II error. Type I is rejecting a true H₀.)
Fill in the blank: The t-distribution has heavier ___ than the standard normal. (Tails)
Q: A sample of 36 light bulbs has a mean lifetime of 1,200 hours with a sample standard deviation of 120 hours. Construct a 95% confidence interval for the population mean lifetime.
A: Since σ is unknown, use t with df = 35. t₀.₀₂₅,₃₅ ≈ 2.030. SE = 120/√36 = 20. CI = 1200 ± 2.030 × 20 = 1200 ± 40.6 = (1159.4, 1240.6). We are 95% confident the true mean lifetime is between 1,159.4 and 1,240.6 hours.
Q: A manufacturer claims the mean weight of cereal boxes is 500g. A sample of 25 boxes has mean 495g and s = 10g. Test at α = 0.05 whether the mean is less than 500g.
A: H₀: μ = 500, H₁: μ < 500 (one-tailed). t = (495 - 500)/(10/√25) = -5/2 = -2.5. df = 24. The critical value for a one-tailed test at α = 0.05 is t₀.₀₅,₂₄ ≈ -1.711. Since -2.5 < -1.711, reject H₀. There is sufficient evidence at the 5% level that the mean weight is less than 500g.
Q: Two independent samples: n₁ = 30, X-bar₁ = 82, s₁ = 8; n₂ = 35, X-bar₂ = 78, s₂ = 7. Test H₀: μ₁ = μ₂ at α = 0.05.
A: Assuming unequal variances. SE = √(64/30 + 49/35) = √(2.133 + 1.4) = √3.533 ≈ 1.88. t = (82 - 78)/1.88 ≈ 2.13. Using Welch df ≈ 56, the critical value for a two-tailed test is roughly ±2.003. Since 2.13 > 2.003, reject H₀. There is evidence of a difference between the two population means.
Confidence intervals and hypothesis tests are two sides of the same coin: a 95% CI contains all parameter values that would not be rejected by a two-sided test at α = 0.05. The t-distribution connects back to the normal and chi-squared distributions. In R, t.test() and prop.test() automate these calculations, which is central to the practical assignment.
confidence interval, CI, margin of error, point estimate, hypothesis test, null hypothesis, alternative hypothesis, p-value, significance level, alpha, Type I error, Type II error, power, t-test, z-test, t-distribution, degrees of freedom, one-sample, two-sample, pooled variance, Welch t-test, proportion test, t.test in R, STAT 3021, Walpole Chapter 9, Walpole Chapter 10