Assume that two independent populations, each following a normal distribution N(μ1,σ12) and N(μ2,σ22) with σ12=σ2=σ22, i.e., the population variances are unknown but assumed to be equal. When the samples are small, meaning the number of samples is n1,n2<30, the hypothesis testing for the difference between two population means D0 is as follows:
H0: μ1−μ2=D0. In other words, the difference in population means is D0.
H1: not μ1−μ2=D0. In other words, the difference in population means is not D0.
test statistic
The test statistic, using the sample standard deviation s1,s2 is as follows:
t=sp2(n11+n21)(X1−X2)−D0
Here, sp2 is the pooled sample variance, calculated as follows:
sp2=n1+n2−2(n1−1)s12+(n2−1)s22
This test statistic follows a t-distribution, with its degrees of freedom df calculated based on the floor function ⌊⋅⌋ as follows:
df=n1−1(s12/n1)2+n2−1(s22/n2)2(n1s12+n2s22)2
Derivation
Strategy: It’s fundamentally challenging for freshmen to grasp, as well as for undergraduate students with some experience, and it usually becomes intuitively understandable at the graduate level. Conversely, if you’ve studied to that extent, it often ends with the enumeration of a few lemmas.
Pooled Sample Variance: When the population variances are unknown but assumed to be equal, the unbiased estimator for the population variance is as follows:
Sp2:=(n1−1)+⋯+(nm−1)(n1−1)S12+⋯+(nm−1)Sm2=∑i=1m(ni−1)∑i=1m(ni−1)Si2
Satterthwaite’s Approximation: Let k=1,⋯,n, and assume Yk∼χrk2 and ak∈R. If for some ν>0k=1∑nakYk∼νχν2
then, the estimator for ν^ can be used as follows:
ν^=∑krkak2Yk2(∑kakYk)2
t=sp2(n11+n21)(X1−X2)−D0=σ2dfsp2/dfσ/n11+n21(X1−X2)−D0
According to Satterthwaite’s approximation, the denominator on the right-hand side follows a chi-squared distribution with degrees of freedom df, the numerator follows a standard normal distribution, and t approximately follows a t-distribution with degrees of freedom df. When the random variable Y follows the t-distribution t(df), rejecting H0 at the significance level α for P(Y≥tα)=α sufficient to satisfy tα is equivalent to:
∣t∣≥tα
This means that relying on the null hypothesis that μ1−μ2=D0 is too far from D0 to be credible.
■
Mendenhall. (2012). Introduction to Probability and Statistics (13th Edition): p400. ↩︎