logo

Small-Sample Hypothesis Testing for the Difference Between Two Population Means 📂Statistical Test

Small-Sample Hypothesis Testing for the Difference Between Two Population Means

Hypothesis Testing 1

Assume that two independent populations, each following a normal distribution N(μ1,σ12)N \left( \mu_{1} , \sigma_{1}^{2} \right) and N(μ2,σ22)N \left( \mu_{2} , \sigma_{2}^{2} \right) with σ12=σ2=σ22\sigma_{1}^{2} = \sigma^{2} = \sigma_{2}^{2}, 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<30n_{1} , n_{2} < 30, the hypothesis testing for the difference between two population means D0D_{0} is as follows:

  • H0H_{0}: μ1μ2=D0\mu_{1} - \mu_{2} = D_{0}. In other words, the difference in population means is D0D_{0}.
  • H1H_{1}: not μ1μ2=D0\mu_{1} - \mu_{2} = D_{0}. In other words, the difference in population means is not D0D_{0}.

test statistic

The test statistic, using the sample standard deviation s1,s2s_{1}, s_{2} is as follows: t=(X1X2)D0sp2(1n1+1n2) t = {{ \left( \overline{X}_{1} - \overline{X}_{2} \right) - D_{0} } \over { \sqrt{ s_{p}^{2} \left( {{ 1 } \over { n_{1} }} + {{ 1 } \over { n_{2} }} \right) } }} Here, sp2s_{p}^{2} is the pooled sample variance, calculated as follows: sp2=(n11)s12+(n21)s22n1+n22 s_{p}^{2} = {{ \left( n_{1} - 1 \right) s_{1}^{2} + \left( n_{2} - 1 \right) s_{2}^{2} } \over { n_{1} + n_{2} - 2 }} This test statistic follows a t-distribution, with its degrees of freedom df\mathrm{df} calculated based on the floor function \lfloor \cdot \rfloor as follows: df=(s12n1+s22n2)2(s12/n1)2n11+(s22/n2)2n21 \mathrm{df} = \left\lfloor {{ \left( {{ s_{1}^{2} } \over { n_{1} }} + {{ s_{2}^{2} } \over { n_{2} }} \right)^{2} } \over { {{ \left( s_{1}^{2} / n_{1} \right)^{2} } \over { n_{1} - 1 }} + {{ \left( s_{2}^{2} / n_{2} \right)^{2} } \over { n_{2} - 1 }} }} \right\rfloor

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:=(n11)S12++(nm1)Sm2(n11)++(nm1)=i=1m(ni1)Si2i=1m(ni1) S_{p}^{2} := {{ \left( n_{1} - 1 \right) S_{1}^{2} + \cdots + \left( n_{m} - 1 \right) S_{m}^{2} } \over { \left( n_{1} - 1 \right) + \cdots + \left( n_{m} - 1 \right) }} = {{ \sum_{i=1}^{m} \left( n_{i} - 1 \right) S_{i}^{2} } \over { \sum_{i=1}^{m} \left( n_{i} - 1 \right) }}

Satterthwaite’s Approximation: Let k=1,,nk = 1, \cdots , n, and assume Ykχrk2Y_{k} \sim \chi_{r_{k}}^{2} and akRa_{k} \in \mathbb{R}. If for some ν>0\nu > 0 k=1nakYkχν2ν \sum_{k=1}^{n} a_{k} Y_{k} \sim {{ \chi_{\nu}^{2} } \over { \nu }} then, the estimator for ν^\hat{\nu} can be used as follows: ν^=(kakYk)2kak2rkYk2 \hat{\nu} = {{ \left( \sum_{k} a_{k} Y_{k} \right)^{2} } \over { \sum_{k} {{ a_{k}^{2} } \over { r_{k} }} Y_{k}^{2} }}

Derivation of Student’s t-distribution from Independent Normal and Chi-squared Distributions: If two random variables W,VW,V are independent and WN(0,1)W \sim N(0,1), Vχ2(r)V \sim \chi^{2} (r), then T=WV/rt(r) T = { {W} \over {\sqrt{V/r} } } \sim t(r)

t=(X1X2)D0sp2(1n1+1n2)=(X1X2)D0σ/1n1+1n2dfsp2σ2/df t = {{ \left( \overline{X}_{1} - \overline{X}_{2} \right) - D_{0} } \over { \sqrt{ s_{p}^{2} \left( {{ 1 } \over { n_{1} }} + {{ 1 } \over { n_{2} }} \right) } }} = {{ { \left( \overline{X}_{1} - \overline{X}_{2} \right) - D_{0} } \over { \displaystyle \sigma / \sqrt{ {{ 1 } \over { n_{1} }} + {{ 1 } \over { n_{2} }} } } } \over { \sqrt{ \displaystyle {{ \textrm{df} s_{p}^{2} } \over { \sigma^{2} }} / \textrm{df} } }} According to Satterthwaite’s approximation, the denominator on the right-hand side follows a chi-squared distribution with degrees of freedom df\mathrm{df}, the numerator follows a standard normal distribution, and tt approximately follows a t-distribution with degrees of freedom df\mathrm{df}. When the random variable YY follows the t-distribution t(df)t(\mathrm{df}), rejecting H0H_{0} at the significance level α\alpha for P(Ytα)=αP \left( Y \ge t_{\alpha} \right) = \alpha sufficient to satisfy tαt_{\alpha} is equivalent to: ttα \left| t \right| \ge t_{\alpha} This means that relying on the null hypothesis that μ1μ2=D0\mu_{1} - \mu_{2} = D_{0} is too far from D0D_{0} to be credible.


  1. Mendenhall. (2012). Introduction to Probability and Statistics (13th Edition): p400. ↩︎