Home page for accesible maths 3.4 The t distribution for the difference of two means

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

3.4.2 Two sample t test

Summary statistics for each exam version are shown in Table 3.7. The teacher would like to evaluate whether this difference is so large that it provides convincing evidence that Version B was more difficult (on average) than Version A.

Version n x¯ s min max
A 30 79.4 14 45 100
B 27 74.1 20 32 100
Table 3.7: Summary statistics of scores for each exam version.
Example 3.4.1

Construct a two-sided hypothesis test to evaluate whether the observed difference in sample means, x¯A-x¯B=5.3, might be due to chance.

Answer. Because the teacher did not expect one exam to be more difficult prior to examining the test results, she should use a two-sided hypothesis test. H0: the exams are equally difficult, on average. μA-μB=0. HA: one exam was more difficult than the other, on average. μA-μB0.

Example 3.4.2

To evaluate the hypotheses in Exercise 3.4.1 using the t distribution, we must first verify assumptions. (a) Does it seem reasonable that the scores are independent within each group? (b) What about the normality condition for each group? (c) Do you think scores from the two groups would be independent of each other (i.e. the two samples are independent)?

Answer. (a) It is probably reasonable to conclude the scores are independent. (b) The summary statistics suggest the data are roughly symmetric about the mean, and it doesn’t seem unreasonable to suggest the data might be normal. Note that since these samples are each nearing 30, moderate skew in the data would be acceptable. (c) It seems reasonable to suppose that the samples are independent since the exams were handed out randomly. After verifying the conditions for each sample and confirming the samples are independent of each other, we are ready to conduct the test using the t distribution. In this case, we are estimating the true difference in average test scores using the sample data, so the point estimate is x¯A-x¯B=5.3. The standard error of the estimate can be calculated using Equation (3.3):

SE=sA2nA+sB2nB=14230+20227=4.62

Finally, we construct the test statistic:

T=point estimate-null valueSE=(79.4-74.1)-04.62=1.15

If we have a computer handy, we can identify the degrees of freedom as 45.97. Otherwise we use the smaller of n1-1 and n2-1: df=26.

Example 3.4.3

Identify the p-value, shown in Figure LABEL:pValueOfTwoTailAreaOfExamVersionsWhereDFIs26. Use df=26.

Answer. We use df=26. (T26<1.15)=0.8697. 2*(1-pt(1.15,df=26)) = 0.2606121. Because the p-value is larger than 0.05, we do not reject the null hypothesis. That is, the data do not convincingly show that one exam version is more difficult than the other, and the teacher should not be convinced that she should add points to the Version B exam scores.
In Exercise 3.4.3, we could have used df=45.97: 2*(1-pt(1.15,df=45.97)) = 0.256.