THE fTEST: COMPARING TWO MEANS
We begin our exploration of bivariate analysis with the twosample ttest. In chapter 20, we saw how to use the onesample ttest to evaluate the probability that the mean of a sample reflects the mean of the population from which the sample was drawn. The two sample ftest evaluates whether the means of two independent groups differ on some variable. Table 21.1 shows some data that Penn Handwerker collected in 1978 from American and Liberian college students on how many children those students wanted.
Table 21.1 Number of Children Wanted (CW) by College Students in the United States and in Liberia
# 
CW 
Region 
Sex 
# 
CW 
Region 
Sex 
# 
CW 
Region 
Sex 
1 
1 
USA 
M 
29 
0 
USA 
F 
57 
12 
WA 
M 
2 
3 
USA 
M 
30 
0 
USA 
F 
58 
12 
WA 
M 
3 
3 
USA 
M 
31 
0 
USA 
F 
59 
8 
WA 
M 
4 
3 
USA 
M 
32 
0 
USA 
F 
60 
6 
WA 
M 
5 
3 
USA 
M 
33 
1 
USA 
F 
61 
4 
WA 
M 
6 
3 
USA 
M 
34 
1 
USA 
F 
62 
4 
WA 
M 
7 
2 
USA 
M 
35 
2 
USA 
F 
63 
2 
WA 
M 
8 
2 
USA 
M 
36 
2 
USA 
F 
64 
3 
WA 
M 
9 
2 
USA 
M 
37 
2 
USA 
F 
65 
3 
WA 
M 
10 
2 
USA 
M 
38 
2 
USA 
F 
66 
4 
WA 
M 
11 
2 
USA 
M 
39 
2 
USA 
F 
67 
4 
WA 
M 
12 
2 
USA 
M 
40 
2 
USA 
F 
68 
4 
WA 
M 
13 
1 
USA 
M 
41 
2 
USA 
F 
69 
4 
WA 
M 
14 
6 
USA 
M 
42 
2 
USA 
F 
70 
3 
WA 
F 
15 
1 
USA 
M 
43 
2 
USA 
F 
71 
3 
WA 
F 
16 
1 
USA 
M 
44 
6 
WA 
M 
72 
3 
WA 
F 
17 
4 
USA 
M 
45 
4 
WA 
M 
73 
3 
WA 
F 
18 
0 
USA 
M 
46 
4 
WA 
M 
74 
7 
WA 
F 
19 
5 
USA 
F 
47 
4 
WA 
M 
75 
2 
WA 
F 
20 
4 
USA 
F 
48 
5 
WA 
M 
76 
4 
WA 
F 
21 
4 
USA 
F 
49 
5 
WA 
M 
77 
6 
WA 
F 
22 
4 
USA 
F 
50 
5 
WA 
M 
78 
4 
WA 
F 
23 
3 
USA 
F 
51 
5 
WA 
M 
79 
4 
WA 
F 
24 
2 
USA 
F 
52 
5 
WA 
M 
80 
4 
WA 
F 
25 
3 
USA 
F 
53 
7 
WA 
M 
81 
4 
WA 
F 
26 
0 
USA 
F 
54 
12 
WA 
M 
82 
4 
WA 
F 
27 
2 
USA 
F 
55 
6 
WA 
M 
83 
4 
WA 
F 
28 
0 
USA 
F 
56 
6 
WA 
M 
84 
4 
WA 
F 
SOURCE: Data Analysis with MYSTAT by H. R. Bernard and W. P Handerwerker, 1995. McGrawHill. Repro ducedwith permission of The McGrawHill Companies.
Table 21.2 shows the relevant statistics for the data in table 21.1. (I generated these with SYSTAT®, but you can use any statistics package.)
There are 43 American students and 41 Liberian students. The Americans wanted, on average, 2.047 children, 1.396 sd, SEM 0.213. The Liberians wanted, on average, 4.951 children, 2.387 sd, SEM 0.373.
Table 21.2 Descriptive Statistics for Data in Table 21.1
CWUSA 
CWLiberia 

N of cases 
43 
41 
Minimum 
0 
2 
Maximum 
6 
12 
Mean 
2.047 
4.951 
95% CI Upper 
2.476 
5.705 
95% CI Lower 
1.617 
4.198 
Standard Error 
0.213 
0.373 
Standard Deviation 
1.396 
2.387 
The null hypothesis, H_{0}, is that these two means, 2.047 and 4.951, come from random samples of the same population—that there is no difference, except for sampling error, between the two means. Stated another way, these two means come from random samples of two populations with identical averages. The research hypothesis, H_{1}, is that these two means, 2.047 and 4.951, come from random samples of truly different populations.
The formula for calculating t for two independent samples is:
That is, t is the difference between the means of the samples, divided by the fraction of the standard deviation, ^, of the total population, that comes from each of the two separate populations from which the samples were drawn. (Remember, we use Roman letters, like s, for sample statistics, and Greek letters, like ^, for parameters.) Since the standard deviation is the square root of the variance, we need to know the variance, ^^{2}, of the parent population.
The parent population is the general population from which the two samples were pulled. Our best guess at ^^{2} is to pool the variances from the two samples:
which is very messy, but just a lot of arithmetic. For the data on the two groups of students, the pooled variance is:
Now we can solve for t:
Testing the Value of t
We can evaluate the statistical significance of t using appendix B. Recall from chapter 20 that we need to calculate the degrees of freedom and decide whether we want a one or a twotailed test to find the critical region for rejecting the null hypothesis. For a two sample ttest, the degrees of freedom equals:
so there are 43 + 41 — 2 = 82 degrees of freedom in this particular problem (box 21.1).
We’ll use a twotailed test for the problem here because we are only interested in the magnitude of the difference between the means, not its direction or sign (plus or minus). We are only interested here, then, in the absolute value of t, 6.844.
Looking at the values in appendix B, we see that any tvalue above 3.291 is significant for a twotailed test at the .001 level. Assuming that our samples represent the populations of American students and Liberian students, we’d expect the observed difference in the means of how many children they want to occur by chance less than once every thousand times we run this survey.
BOX 21.1
ONE AND TWOTAILED TESTS
To recap from chapter 20, if you test the possibility that one mean will be higher than another, then you need a onetailed test. After all, you're only asking whether the mean is likely to fall in one tail of the tdistribution (see figure 6.7). With a onetailed test, a finding of no difference (the null hypothesis) is equivalent to finding that you predicted the wrong mean to be the one that was higher. If you want to test only whether the two means are different (and not that one will be higher than the other), then you need a twotailed test. In appendix B, as in appendix A, scores significant at the .10 level for a twotailed test are significant at the .05 level for a onetailed test; scores significant at the .05 level for a twotailed test are significant at the .025 level for a onetailed test, and so on.