Although separate samples selected from the two populations seems like a natural experimental design for this problem, this design may not produce the best results. In the salary comparison example discussed in the previous section, it would be reasonable to assume that the salaries of individuals in both populations would be related to experience. It may have been the case that the differences we saw in salaries was due to the fact that salary is strongly related to experience and there was a significant difference in experience between the two groups. We cannot eliminate the possible effect of experience and the confusion in interpretation that it causes by our independent sampling design.

By incorporating this additional variable into our experimental design we can
reduce variability and potential confusion, thereby increasing the sensitivity
of our test. There are two ways this can be accomplished. One way is to include
a measure of experience as a second variable that is recorded for each person
selected in the two samples. This design involves a type of analysis called
**Analysis of Covariance** which is beyond the scope of this course. The
second way to incorporate this additional variable into the analysis is to
design a **matched pairs** sampling process. In this sampling design we
randomly select one individual from the first population, determine the
experience level of the person selected, then identify from the second
population all individuals who have the same experience and randomly select one
of those to be matched with the first individual selected. This selecting and
matching process is continued to we obtain matched pairs of individuals,
matched according to experience. This paired sampling design removes the
effect of experience on salaries, and so any differences that remain between
the two groups cannot be due to differences in experience.

Other comparison problems involve naturally occurring pairs. A common experimental design to test for the effect of some treatment is to give a pre-treatment test to a group, apply the treatment, and then give a post-treatment test. The test scores are naturally paired - one pre-treatment and one post-treatment score for each individual. In another example, we may wish to obtain a sample of married couples and then compare the scores of the husbands and wives on a questionnaire each takes. The key difference here between paired sampling and independent sampling is that in this case we are randomly selecting a sample of married couples rather than randomly selecting a sample of males who are husbands and separately selecting a sample of females who happen to be wives.

Let denote the pairs of measurements that are obtained from a paired-sample experiment, and suppose that we wish to test the hypotheses

where the first population has mean and the second population has mean . In paired-sample experiments the pair differences, , , contain the relevant information about the hypotheses. Therefore, we can express the hypotheses in terms of the pair differences by defining . Then we have

This has the effect of transforming the problem to a one-sample problem, and so we can use the one-sample t-test applied to the pair differences to test these hypotheses. This test is based on the mean and standard deviation of the pair differences, . While it is possible to obtain the mean of the pair differences by computing the difference between the sample means, there is no such shortcut to obtain the standard deviation of the pair differences. It must be computed from the pair differences directly. The resulting test is called a paired-sample t-test, and the sample size for the test is the

**Example** Suppose that we implement a matched pairs sampling design for
the comparison of salaries, matching on experience, and find that in a sample
of 18 matched males and females, their salary information is

, ,
, , .

Note that the individual group standard deviations, , are not part of
the paired-sample test, and the sample mean of the pair differences is

Therefore, the test statistic is

We use the t-distribution with 17 degrees of freedom since the data for this test consists of the 18 pair differences. The test statistic is between the t-values

We are 95% confident that the difference between the mean salary for males and the mean salary for females is in this interval. We can also say that this difference is not due to possible differences in experience between the two groups since the effect of that variable has been removed by our matched-pair sampling design.

2015-11-12