Comparing normal distributions
In an earlier section, we derived a confidence interval for the difference between the means of two normal distributions, provided the variances of the distributions were equal. This was based on two independent random samples,
\[ X_{1,i} \;\;\sim\;\; \NormalDistn(\mu_1,\;\sigma^2) \qquad \text{for } i=1,\dots,n_1 \\ X_{2,i} \;\;\sim\;\; \NormalDistn(\mu_2,\;\sigma^2) \qquad \text{for } i=1,\dots,n_2 \]We showed that the difference between the sample means was normally distributed,
\[ \overline{X}_1 - \overline{X}_2 \;\;\sim\;\; \NormalDistn\left(\mu_1 - \mu_2,\;\sigma^2\left(\frac 1{n_1} + \frac 1{n_2}\right)\right) \]and that the best estimate of the common variance, \(\sigma^2\), is
\[ S_{\text{pooled}}^2 \;\;=\;\; \frac{(n_1 - 1)S_1^2 + (n_2 - 1)S_2^2}{n_i + n_2 - 2} \]The distribution of the pooled estimate of the variance is proportional to a chi-squared distribution,
\[ \frac{n_1 + n_2 - 2}{\sigma^2}S_{\text{pooled}}^2 \;\;\sim\;\; \ChiSqrDistn(n_1 + n_2 - 2 \text{ df}) \]Our best estimate of the standard error of \( \overline{X}_1 - \overline{X}_2\) was therefore shown to be
\[ \se(\overline{X}_1 - \overline{X}_2) \;=\; \sqrt{\frac{(n_1 - 1)S_1^2 + (n_2 - 1)S_2^2}{n_1 + n_2 - 2} \left(\frac 1{n_1} + \frac 1{n_2}\right) } \]Testing for equal means
We now consider a hypothesis test for whether the two means are equal,
H0 : \(\mu_1 = \mu_2\)
HA : \(\mu_1 \ne \mu_2\)
(or the corresponding one-tailed alternative). The following function of the data can be used as a test statistic since its distribution is fully known when the null hypothesis holds.
Test statistic
If \(\overline{X}_1\) and \(S_1^2\) are the mean and variance of a sample of \(n_1\) values from a \(\NormalDistn(\mu_1, \sigma^2)\) distribution and \(\overline{X}_2\) and \(S_2^2\) are the mean and variance of an independent sample of \(n_2\) values from a \(\NormalDistn(\mu_2, \sigma^2)\) distribution,
\[ T \;\;=\;\; \frac{\overline{X}_1 - \overline{X}_2}{\se(\overline{X}_1 - \overline{X}_2)} \;\;\sim\;\; \TDistn(n_1 + n_2 - 2 \text{ df}) \]provided \(\mu_1 = \mu_2\).
The T variable can be rewritten as
\[ \begin{align} T \;\;&=\;\; \frac{\overline{X}_1 - \overline{X}_2}{\sqrt{\sigma^2\left(\large \frac 1{n_1} + \frac 1 {n_2}\right)}} \div \sqrt{\frac{\left(\frac{\large n_1 + n_2 - 2}{\large \sigma^2} S_{\text{pooled}}^2 \right)} {n_1 + n_2 - 2}} \\ &\sim\;\; \NormalDistn(0,1) \div \sqrt{\frac{\ChiSqrDistn(n_1 + n_2 - 2 \text{ df})}{n_1 + n_2 - 2}} \\ &=\;\; \TDistn(n_1 + n_2 - 2 \text{ df}) \end{align} \]A p-value for the test is the probability of a value from this t distribution that is further from zero than the value that is evaluated from the actual data. This will be demonstrated in a numerical example.
Example
A botanist is interested in comparing the growth response of dwarf pea stems to two different levels of the hormone indoleacetic acid (IAA). Using 16 day old pea plants the botanist obtains 5 millimetre sections and floats these sections on solutions with different hormone concentrations to observe the effect of the hormone on the growth of the pea stem. Let \(X\) and \(Y\) denote respectively the independent growths that can be attributed to the hormone during the first 26 hours after sectioning for \((0.5 \times 10^{-4})\) and \(10^{-4}\) levels of concentration of IAA.
The botanist measured the growths of pea stem segments in millimetres for \(n_X = 11\) observations of \(X\):
0.8 | 1.8 | 1.0 | 0.1 | 0.9 | 1.7 | 1.0 | 1.4 | 0.9 | 1.2 | 0.5 |
and \(n_Y = 13\) observations of \(Y\):
1.0 1.8 |
0.8 2.5 |
1.6 1.4 |
2.6 1.9 |
1.3 2.0 |
1.1 1.2 |
2.4 |
Test whether the larger hormone concentration results in greater growth of the pea plants.
This is a one-tailed test of the hypotheses
H0 : \(\mu_X = \mu_Y\)
HA : \(\mu_X \lt \mu_Y\)
For these data, \(\overline{x} = 1.027\), \(s_X^2 = 0.244\), \(\overline{y} = 1.662\) and \(s_Y^2 = 0.353\).
Assuming that the variance, \(\sigma^2\), is the same in both groups, its pooled estimate is
\[ s_{\text{pooled}}^2 \;=\; \frac{10\times s_X^2 + 12\times s_Y^2}{22} \;=\; 0.3033 \]The two-sample test statistic is
\[ t \;\;=\;\; \frac{1.027 - 1.662}{\sqrt{0.3033 \left(\large \frac 1{11} + \frac 1{13}\right)}} \;\;=\;\; -2.81 \]The p-value for the test is the lower tail area of the \(\TDistn(22 \text{ df})\) distribution below this value,
p-value = \(P(T \le -2.81) \;\;=\;\; 0.0051\)
We therefore conclude that there is very strong evidence that the mean growth of the peas is higher at the higher hormone concentration.