One-Sample and Independent Samples t-Tests
The t-test family is used to compare means when the outcome variable is continuous and approximately normally distributed (or n is large enough for the Central Limit Theorem to apply). The one-sample t-test compares a sample mean to a known or hypothesized population value (ΞΌβ). Formula: t = (xΜ β ΞΌβ) / (s / βn), where xΜ is the sample mean, ΞΌβ is the null hypothesis value, s is the sample standard deviation, and n is the sample size. Degrees of freedom: df = n β 1. Example: a company claims its product reduces delivery time to 5 days. You sample 25 deliveries and find xΜ = 5.8 days, s = 1.2 days. t = (5.8 β 5.0) / (1.2 / β25) = 0.8 / 0.24 = 3.33. With df = 24, the critical value at Ξ± = 0.05 two-tailed is 2.064. Since 3.33 > 2.064, reject Hβ. The independent samples t-test (two-sample t-test) compares the means of two independent groups. Formula: t = (xΜβ β xΜβ) / SE_pooled, where SE_pooled depends on whether equal variances are assumed (Student's t-test) or not assumed (Welch's t-test). Welch's t-test is generally preferred because it does not require the equal-variance assumption and performs well even when variances are equal. Degrees of freedom for Welch's t-test are calculated with the Welch-Satterthwaite equation (a complex formula β software handles this). Assumption checks for both tests: (1) independence of observations, (2) approximately normal distribution of the outcome (or n β₯ 30 per group for CLT), (3) no extreme outliers. Violations: use nonparametric alternatives (Mann-Whitney U for independent, Wilcoxon signed-rank for paired).