Hypothesis Tests about the Difference of Means
of Two Independent Normal Populations

T2MNTEST.83p
T2MNTEST.86p
t2mntest.89p

Consider two independent normally distributed populations W1 and W2 having unknown means µ1 and µ2 respectively. We wish to test, with level of significance a, the following three null hypotheses about the difference in means µ1 - µ2:

1. Ho: µ1 - µ2 <= M
2. Ho: µ1 - µ2 >= M
3. Ho: µ1 - µ2 = M


As in the previous section, we base our decision for each test on the difference in sample means Xbar - Ybar from independent random samples, of sizes n and m respectively, conducted on each population.

If we assume the populations have a common variance, then we define a "pooled deviation" Sp to approximate the common standard deviation by

Sp = Sqrt[ ( (n - 1)(Sx)^2 + (m - 1)(Sy)^2 ) / (n + m - 2) ],

where Sx and Sy are the respective sample deviations. Then we define a test statistic by

x = (Xbar - Ybar - M) / ( Sp Sqrt[ 1 / n + 1 / m ] ),

which follows a T distribution with n + m - 2 degrees of freedom: X ~ T(n+m-2).


If we do not assume that the populations have a common variance, then the data still forms a T distribution with r degrees of freedom, where r is the greatest integer less than or equal to

[(Sx)^2 / n + (Sy)^2 / m ]^2 / [ ( (Sx)^2 / n )^2 / (n-1) + ( (Sy)^2 / m )^2 / (m-1) ].

The test statistic is then given by

x = (Xbar - Ybar - M) / ( Sqrt[ (Sx)^2 / n + (Sy)^2 / m ].


In either case, we use the appropriate T distribution to compute the right and left tail probability values created by the test statistic, P(X >= x) and P(X <= x).

We reject the first hypothesis µx - µy <= M when Xbar - Ybar is too large, which means the right tail value will be too small: P(X >= x) < a. This test is equivalent to the test Ho: µx - µy = M with the one-sided alternative Ha: µx - µy > M.

Likewise, we reject the the second hypothesis µx - µy >= M if Xbar - Ybar is too small, which means the left tail value will be too small: P(X <= x) < a. This test is equivalent to the test Ho: µx - µy = M with the one-sided alternative Ha: µx - µy < M.

If P(X >= x) < a / 2 or P(X <= x) < a / 2, then we reject the third hypothesis µx - µy = M. The p-value for this two-sided test is always given by twice the smallest tail value.



Using the T2MNTEST Program

The T2MNTEST program can be used to perform these hypothesis tests. To execute the program, we enter the value of the difference M to be tested, the sample sizes, sample averages, sample deviations, and the level of significance. To denote that we are using the pooled sample deviation for populations having a common variance, enter 1 for POOLED?. Otherwise enter 0 for POOLED?. The program displays the conclusion for each test, the test statistic, and the left and right tail values.



Example. A study on the IQ's of a group of 29 adopted children yielded an average IQ of 97 with a standard deviation of 13. Suppose another group of 68 children yielded an average IQ of 109 with a standard deviation of 11. Assume that IQ scores are normally distributed, that these groups were independent, and that there is equality of the true variances of scores within the entire populations of children from which these two samples came.

Test, at the 0.10 level of significance, the following three hypotheses about the true difference in average IQ scores between all children similar to the first group and all children similar to the second group:

1. Ho: µ1 - µ2 <= -10
2. Ho: µ1 - µ2 >= -10
3. Ho: µ1 - µ2 = -10


Solution. After calling up the T2MNTEST program, enter -10 for TEST DIFFERENCE, 29 for X SAMPLE SIZE, 97 for XBAR, 13 for X SAMPLE DEV., 68 for Y SAMPLE SIZE, 109 for YBAR, 11 for Y SAMPLE DEV., and .10 for LEVEL OF SIG. Finally enter 1 for POOLED?.

We obtain a left tail value of 0.2199 from a test statistic of -0.7757, and we do not reject any of the hypotheses.

Based on this data, we can accept the claim that µ1 - µ2 = -10, or that µ2 - µ1 = 10. That is, the second population of children could possibly average 10 points higher in IQ than the first population of children.

We note that Xbar - Ybar = -12. But if µ1 - µ2 = -10, then there is still a 21.99% chance of Xbar - Ybar being as low as -12 with random samples of these sizes; thus we do not have enough evidence to reject the claim of µ1 - µ2 = - 10. (The p-value for this two-sided test is 2*.2199 = 0.4398.)



Exercises

1. Consider the following independent random samples of Verbal SAT scores:

A Random Collection of Girls' Verbal SAT Scores
530
570
550
410
680
470
600
660
510
520
570
490
390
500
360
760
510
320
410
400
440

A Random Collection of Boys' Verbal SAT Scores
490
560
530
540
540
360
470
380
450
600
540
510
440
440
440
590
460
490
570
470
430

Assume that the scores are from normally distributed populations with girls' scores and boys' scores having equal variance. If the true mean for girls is µ1 and the true mean for boys is µ2, test the following three hypotheses at the 0.10 level of significance.

1. Ho: µ1 - µ2 <= 70
2. Ho: µ1 - µ2 >= 70
3. Ho: µ1 - µ2 = 70


2. Consider now the following random samples of Math SAT scores for which we no longer assume equal variances among boys' scores and girls' scores.

A Random Collection of Boys' Math SAT Scores
450
540
500
580
620
580
650
520
610
710
640
520
520
600
650
600
550
410
580
500
620
500
570
590
450
520
540
660
490
570
460
410

A Random Collection of Girls' Math SAT Scores
590
620
540
520
490
530
520
570
570
350
320
420
380
470
590
480
380
520
540
570
510
490
510
510
500
490
410
500
520
550
580
630

State and conduct a test on whether or not the average scores of boys and girls are the same.



Solutions

1. Enter the data into appropriate lists to compute the summary statistics: Xbar = 507.1428571, Sx = 110.2788673, Ybar = 490.4761905, Sy= 65.68684727 for these samples of size 21. Now we can either enter these value into the T2MNTEST program directly, or we can access them symbolically from the menus.

After executing the T2MNTEST program with a test difference of 70 and with a pooled variance, we obtain a left tail value of 0.0321 from a test statistic of -1.904057, and we reject only the second and third hypotheses.

Based on this data, we can accept that µ1 - µ2 < 70. That is, the average girls' score should be less than 70 points higher than the average boys' score.

We note that Xbar - Ybar = 16.667. If µ1 - µ2 >= 70, then there would be at most a 3.21% chance of Xbar - Ybar being as small as it is with samples of these sizes. (The p-value for the two-sided test is 2*.0321 = 0.0642, which is still below the level of significance.) Thus, we reject the second and third hypotheses.


2. Let µ1 be the true mean for boys and let µ2 be the true mean for girls. We shall test the hypothesis Ho: µ1 = µ2, with the alternative Ha: µ1 > µ2, at the 0.05 level of significance. This test is equivalent to Ho: µ1 - µ2 = 0, with a one-sided alternative Ha: µ1 - µ2 > 0.

After entering the data and computing the statistics, we execute the T2MNTEST program with 0 for TEST DIFFERENCE and 0 for POOLED?. We receive a right-tail value of 0.0063, so we must reject the null hypothesis. For if µ1 - µ2 = 0, then there would be at most a 0.63% chance of Xbar - Ybar being as large as 48.125 with samples of these sizes.



Return to Table of Contents.