Approach

We have seen that the problem of testing whether two paired measurements, X and Y, have equal means is done in terms of the differences

D = Y - X

The test is then expressed as

H0:   µD = 0

HA:   µD ≠ 0

or a one-tailed variant. This is a standard univariate hypothesis test of the form analysed in the previous section.

Paired t-test

The hypotheses are therefore assessed with a standard t-test. The test statistic is

and it is compared against a t distribution with n - 1 degrees of freedom to find the p-value.

Estimated and actual costs for projects

A construction company is concerned that it is underestimating the costs of the projects for which it is bidding. To help assess this, the company selected a sample of 20 recently completed projects for review. Data were obtained about the actual labour costs for the projects (in thousands of hours) and the estimated costs at the time of the bid.

Project Actual Estimate Difference
(actual - estimate)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
9.5
6.3
18.2
3.7
25.0
26.5
23.6
8.5
8.0
21.0
9.8
11.3
10.7
13.2
3.4
13.3
9.2
16.7
14.4
15.9
4.4
8.4
14.3
0.9
24.6
25.4
23.8
3.4
3.2
19.5
4.9
11.9
9.4
7.9
5.7
14.8
6.5
18.0
12.4
12.9
5.1
-2.1
3.9
2.8
0.4
1.1
-0.2
5.1
4.8
1.5
4.9
-0.6
1.3
5.3
-2.3
-1.5
2.7
-1.3
2.0
3.0

The data are paired since the actual and estimated costs come from the same projects.

We are testing to see if there is evidence that the estimates are too low, a one-tailed test. Denoting the difference (actual – estimate) by D, we are looking for evidence that µD > 0 (meaning that the actual cost tends to be higher than the estimate). The hypotheses are therefore:

H0:   µD = 0

HA:   µD > 0

The diagram below shows the differences on the left. The p-value for the test is calculated on the right.

Since the p-value for the test is very close to zero (0.003), there is strong evidence from these projects that labour costs are being underestimated.


Select Modified Data from the pop-up menu, then use the slider to investigate how low the mean actual labour cost would need to be for there to be little evidence of a difference.

Music and work efficiency

In this example, a measurement of efficiency was made from employees both before and after a music system was installed. The data were tabulated at the start of this section and are graphed below.

Here we use a two-tailed test as the music may either increase or decrease efficiency. Denoting the difference for each employee as D = (after - before), we are therefore interested in the hypotheses:

H0:   µD = 0

HA:   µD ≠ 0

The p-value for this test is calculated on the right below.

The resulting p-value is very small, giving strong evidence that efficiency has changed. The test only gives evidence of a difference in the mean efficiencies. However the positive t value suggests µD > 0, so it is valid to conclude that there is evidence of an increase in efficiency after the system was installed.

Again, select Modified Data and investigate how different the sample means must be to give evidence of a difference in the population means.