Let’s say two independent populations follow distributions (μ1,σ12) and (μ2,σ22), respectively. In the case of a large sample, meaning the sample size is n1,n2>30, the hypothesis test about the difference between the two population means against candidate D0 is as follows:
H0: μ1−μ2=D0. That is, the difference in population means is D0.
H1: μ1−μ2=D0. That is, the difference in population means is not D0.
test statistic
The test statistic is calculated slightly differently depending on whether the population standard deviation σ1,σ2 is known or not.
When σ1,σ2 is unknown: Use the sample standard deviations1,s2 as follows.
Z=n1s12+n2s22(X1−X2)−D0
Explanation
Probably D0 is mostly used for 0, because in many cases, the crucial part one wants to know is ‘whether the two distributions have the same population mean’ rather than ‘how exact is the difference’. The most complex-looking part in the form of the test statistic is the denominator n1σ12+n2σ22, which becomes fun to study once you learn its derivation after studying Mathematical Statistics. Unfortunately, freshmen have to memorize it.
Since we assume a large sample from both populations, regardless of the population distribution, X1,X2 follows the normal distribution according to the Central Limit Theorem.
X1=X2=n11k=1∑n1X1∼N(μ1,n1σ12)n21k=1∑n2X2∼N(μ2,n2σ22)
If Xi∼N(μi,σi2) then given vector (a1,⋯,an)∈Rni=1∑naiXi∼N(i=1∑naiμi,i=1∑nai2σi2)
Given vector (a1,a2)=(1,−1)∈R2X1−X2=∼∼a1X1+a2X2N(i=1∑2aiμi,i=1∑2ai2σi2)N(μ1−μ2,12⋅n1σ2+(−1)2⋅n2σ2)
thus under the null hypothesis H0:μ1−μ2=D0Z=n1σ12+n2σ22(X1−X2)−D0∼N(0,1)
follows a distribution almost approximated to the standard normal distributionN(0,1). Similarly, in the case of a large sample s≈σ, when the population variance is unknown, it’s acceptable to use s instead of σ. When the random variableY follows the standard normal distribution, for the significance levelα, rejecting H0 when P(Y≥zα)=α for zα is equivalent to the following.
∣Z∣≥zα
This means that it’s too implausible to believe in μ1−μ2=D0 under the null hypothesis, as X1−X2 is too far from D0.
■
Mendenhall. (2012). Introduction to Probability and Statistics (13th Edition): p363. ↩︎