Source: STAT 211 Engineering Statistics, Texas A&M University Difficulty: Intermediate to Advanced | Prerequisites: Parts 1–3 notes (all prior material, especially confidence intervals and hypothesis testing)
Tags: two-sample t-test, two-proportion Z-test, pooled t-test, simple linear regression, SLR, least squares, slope, intercept, coefficient of determination, R-squared, correlation, power, beta, Type II error, STAT 211, Texas A&M, FE exam
Until now, every test involved a single population. This final stretch adds comparisons between two independent groups (two means, two proportions) and introduces regression, which models the relationship between a quantitative predictor and a quantitative response. Power analysis closes the loop by asking: "Was my study large enough to detect a meaningful effect?" These are the topics that dominate the final exam and the FE exam.
Two-sample tests extend the one-sample framework by comparing two independent groups; the test statistic is the difference in estimates divided by a pooled or unpooled standard error. Simple linear regression fits a line to data and uses a t-test on the slope to decide whether the predictor matters. Power quantifies how likely you are to detect an effect that actually exists.
Independent samples
Two samples drawn separately, with no pairing between observations. Compare this with matched pairs, where each observation in one group is linked to a specific observation in the other.
Pooled two-sample t-test
A t-test that assumes both populations have the same variance (σ₁² = σ₂²). It combines the sample variances into a single pooled estimate sₚ². In simple terms, you blend the spread information from both groups because you believe they are equally variable.
Unpooled (Welch's) two-sample t-test
A t-test that does not assume equal variances. The degrees of freedom are computed with the Welch-Satterthwaite formula, which generally gives a non-integer df. This is the safer default when you are unsure about equal variances.
Two-proportion Z-test
A test comparing two population proportions using a pooled proportion p̂ = (x₁ + x₂) / (n₁ + n₂) under H₀: p₁ = p₂.
Simple linear regression (SLR)
A model that describes the relationship between one predictor (x) and one response (y) using a straight line: ŷ = b₀ + b₁x. Think of it as the best-fit line through a scatter plot.
Least squares
The method that chooses b₀ and b₁ to minimise the sum of squared residuals, Σ(yᵢ , ŷᵢ)². It is the standard way to fit a regression line.
Slope (b₁)
The estimated change in y for a one-unit increase in x. In simple terms, it is the rate at which y changes as x moves.
Intercept (b₀)
The estimated value of y when x = 0. It anchors the line on the y-axis, though it may not always have a meaningful real-world interpretation.
Residual
The difference between an observed value and the predicted value: eᵢ = yᵢ , ŷᵢ. Residuals are the vertical distances from data points to the fitted line.
Coefficient of determination (R²)
The proportion of the total variability in y that is explained by the linear relationship with x. Ranges from 0 to 1. In simple terms, R² = 0.85 means 85% of the variation in y can be accounted for by x.
Correlation coefficient (r)
A measure of the strength and direction of the linear relationship between x and y. Ranges from ,1 to +1. r² = R² in simple linear regression.
Standard error of the slope (SE_b₁)
Quantifies the uncertainty in the estimated slope. Used to build confidence intervals and conduct hypothesis tests for b₁.
Power (1 , β)
The probability of correctly rejecting a false null hypothesis. In simple terms, it is your test's ability to detect an effect when one exists.
Effect size
The magnitude of the difference or relationship you are trying to detect. Larger effect sizes are easier to detect with smaller samples.
H₀: μ₁ , μ₂ = 0 (or some hypothesised difference δ₀), Hₐ: one-sided or two-sided.
Pooled t-test (equal variances assumed):
Pooled variance: sₚ² = [(n₁ , 1)s₁² + (n₂ , 1)s₂²] / (n₁ + n₂ , 2)
Test statistic: t = (x̄₁ , x̄₂ , δ₀) / [sₚ√(1/n₁ + 1/n₂)]
df = n₁ + n₂ , 2
Welch's t-test (unequal variances):
Test statistic: t = (x̄₁ , x̄₂ , δ₀) / √(s₁²/n₁ + s₂²/n₂)
df from the Welch-Satterthwaite approximation (usually computed by software; round down if using a table).
When in doubt about equal variances, use Welch's. It is valid regardless.
Pooled: (x̄₁ , x̄₂) ± t* · sₚ√(1/n₁ + 1/n₂)
Unpooled: (x̄₁ , x̄₂) ± t* · √(s₁²/n₁ + s₂²/n₂)
If the CI does not contain 0, you would reject H₀: μ₁ = μ₂ at the corresponding α.
H₀: p₁ = p₂, Hₐ: one-sided or two-sided.
Pooled proportion: p̂ = (x₁ + x₂) / (n₁ + n₂)
Test statistic: Z = (p̂₁ , p̂₂) / √[p̂(1 , p̂)(1/n₁ + 1/n₂)]
Conditions: each group needs at least 5 successes and 5 failures.
(p̂₁ , p̂₂) ± z* · √[p̂₁(1 , p̂₁)/n₁ + p̂₂(1 , p̂₂)/n₂]
Note: the CI formula uses each group's own p̂, not the pooled proportion (the pooled proportion is only for the test statistic under H₀).
The model: Y = β₀ + β₁X + ε, where ε ~ N(0, σ²).
The least-squares estimates are:
b₁ = Σ(xᵢ , x̄)(yᵢ , ȳ) / Σ(xᵢ , x̄)²
b₀ = ȳ , b₁x̄
Interpretation of b₁: "For each one-unit increase in X, Y is estimated to change by b₁ units, on average."
Interpretation of b₀: "When X = 0, the estimated mean of Y is b₀." Caution: extrapolation beyond the observed range of X may make this meaningless.
H₀: β₁ = 0 (no linear relationship), Hₐ: β₁ ≠ 0 (or one-sided).
Test statistic: t = b₁ / SE_b₁, df = n , 2.
Rejecting H₀ means you have evidence that X and Y are linearly related.
b₁ ± t* · SE_b₁, df = n , 2.
If the interval does not contain 0, the relationship is significant at the corresponding α.
CI for the mean response at x₀: estimates where the average Y falls at a specific X. Narrower.
Prediction interval for a single new observation at x₀: estimates where one future Y will fall. Wider, because it includes individual variability on top of estimation uncertainty.
Both are centred on ŷ₀ = b₀ + b₁x₀ but differ in their standard errors.
R² = SSR / SST = 1 , (SSE / SST), where SST = total sum of squares, SSR = regression sum of squares, SSE = error sum of squares.
In SLR, r = ±√R², with the sign matching the sign of b₁.
R² does not imply causation. A high R² says the line fits well; it says nothing about why.
Power increases when:
The true effect size is larger.
The sample size n is larger.
The significance level α is larger (though this also raises Type I error risk).
The population variability σ is smaller.
Power analysis is used before data collection to determine how many observations you need to reliably detect a meaningful effect.
The relationship: β = P(fail to reject H₀ | H₀ is false), Power = 1 , β.
Pooled variance: sₚ² = [(n₁ , 1)s₁² + (n₂ , 1)s₂²] / (n₁ + n₂ , 2)
Pooled two-sample t: t = (x̄₁ , x̄₂) / [sₚ√(1/n₁ + 1/n₂)], df = n₁ + n₂ , 2
Welch's two-sample t: t = (x̄₁ , x̄₂) / √(s₁²/n₁ + s₂²/n₂)
Two-proportion Z: Z = (p̂₁ , p̂₂) / √[p̂(1 , p̂)(1/n₁ + 1/n₂)]
Least-squares slope: b₁ = Σ(xᵢ , x̄)(yᵢ , ȳ) / Σ(xᵢ , x̄)²
Least-squares intercept: b₀ = ȳ , b₁x̄
t-test for slope: t = b₁ / SE_b₁, df = n , 2
Coefficient of determination: R² = 1 , (SSE / SST)
Two-sample tests are how engineers compare a new alloy against an existing one, or how pharmaceutical trials compare treatment to placebo. Regression is the backbone of predictive modelling in engineering: modelling fuel efficiency against engine displacement, predicting material fatigue life from stress levels, or calibrating a sensor. Power analysis determines the minimum sample size for a product test to meet regulatory evidence standards.
Students confuse the pooled t-test with the paired t-test. Pooled compares two independent groups; paired compares two linked measurements. The data structure determines which test to use.
In the two-proportion test, students sometimes forget to use the pooled proportion p̂ in the standard error under H₀, and instead plug in each group's p̂ separately. That is correct for the CI, but not for the test statistic.
A common regression mistake is interpreting R² as a measure of causation. R² = 0.90 means a strong linear fit, not that X causes Y.
Students often interpret the slope as "Y increases by b₁" without adding "for each one-unit increase in X." The one-unit qualifier is essential.
⚠️ Know when to use pooled vs. Welch's vs. paired. The exam will test your ability to pick the correct procedure from a problem description.
⚠️ Regression interpretation: be ready to write a sentence interpreting the slope, intercept, and R² in context.
⚠️ The distinction between a confidence interval for the mean response and a prediction interval is a classic exam question.
⚠️ Power questions: understand the four factors that influence power. You may not be asked to compute power by hand, but you will be asked how changes in n, α, σ, or effect size affect it.
⚠️ On the final exam (cumulative, 120 minutes, two pages of notes allowed): budget your note sheets carefully. Formulas from all four parts are fair game.
True or False: The pooled two-sample t-test assumes the two populations have equal variances.
Fill in the blank: In simple linear regression, the degrees of freedom for the slope t-test are ___.
True or False: A prediction interval is narrower than a confidence interval for the mean response at the same x₀.
Fill in the blank: Power increases as sample size ___.
True or False: In the two-proportion Z-test under H₀: p₁ = p₂, you use a pooled proportion in the standard error.
Answers: 1. True. 2. n , 2. 3. False (a prediction interval is wider). 4. Increases. 5. True.
Q: Group A (n₁ = 20, x̄₁ = 75, s₁ = 8) and Group B (n₂ = 25, x̄₂ = 70, s₂ = 9). Using the pooled t-test, compute the test statistic for H₀: μ₁ , μ₂ = 0.
A: sₚ² = [(19)(64) + (24)(81)] / 43 = (1216 + 1944) / 43 = 3160 / 43 ≈ 73.49. sₚ ≈ 8.573. SE = 8.573√(1/20 + 1/25) = 8.573√(0.09) = 8.573(0.3) ≈ 2.572. t = (75 , 70) / 2.572 ≈ 1.94 with df = 43.
Q: A regression analysis gives ŷ = 3.2 + 1.8x with R² = 0.72. Interpret the slope and R².
A: For each one-unit increase in x, y is estimated to increase by 1.8 units on average. R² = 0.72 means 72% of the variability in y is explained by the linear relationship with x.
Q: In a clinical trial, 45 of 200 patients in Group 1 and 30 of 180 in Group 2 experienced a side effect. Test H₀: p₁ = p₂ at α = 0.05.
A: p̂₁ = 45/200 = 0.225, p̂₂ = 30/180 = 0.167. Pooled p̂ = (45 + 30) / (200 + 180) = 75/380 ≈ 0.1974. SE = √[0.1974(0.8026)(1/200 + 1/180)] = √[0.1974(0.8026)(0.01056)] ≈ √(0.001673) ≈ 0.0409. Z = (0.225 , 0.167) / 0.0409 ≈ 1.42. The two-tailed p-value ≈ 0.156. Since 0.156 > 0.05, fail to reject H₀. There is not sufficient evidence of a difference in side-effect rates.
Q: Name three ways to increase the power of a hypothesis test.
A: Increase the sample size, increase the significance level α, or study a population with less variability (smaller σ). A larger true effect size also yields higher power, though that is a property of the population rather than a design choice.
Q: What is the key difference between a confidence interval for the mean response and a prediction interval?
A: The CI for the mean response estimates where the average Y falls at a given X. The prediction interval estimates where a single new observation will fall, and is wider because it accounts for individual-observation variability on top of the estimation uncertainty.
Two-sample tests generalise naturally to ANOVA (analysis of variance) for comparing more than two groups, which is covered in follow-on statistics courses. Regression extends to multiple linear regression when you have more than one predictor. Power analysis ties back to confidence intervals: the width of a CI is inversely related to the sample size, and power analysis formalises that trade-off.
two-sample t-test, pooled t-test, Welch's t-test, independent samples, two-proportion Z-test, pooled proportion, simple linear regression, SLR, least squares, slope, intercept, residual, R-squared, coefficient of determination, correlation coefficient, prediction interval, confidence interval for mean response, power, Type II error, beta, effect size, sample size planning, SST, SSR, SSE, ANOVA preview, STAT 211, engineering statistics, FE exam, Texas A&M