# Lab 14: Related-Samples t-test

• When to use related-samples t-test?

• How to conduct related-samples t-test by hand?

• How to run related sample t-test by SPSS?

## Hypothesis tests analyzed with related samples t-tests

In the prior lab we examined how to use a t-test to compare a treatment sample against a population (for which s isn't known). Today we'll consider situations where the two samples means come from related samples. The are two ways the samples can be related. In one case, there are two separate but related samples. In the other case, there is a single sample of individuals, each of which gets measured on the dependent variable twice.

Consider the following examples:

 Example 1: Suppose that you are interested in if girls tend to be less satisfied with their romantic relations than boys. You surveyed 10 pairs with the Relationship Satisfaction Scale with 1 = Least Satisfied and 5 = Most Satisfied.
 Example 2: Suppose that you want to find out whether viagra impairs vision. Instead of comparing two separate groups, you decide to test the same set of individuals. In the first stage of the experiment you give your participants a placebo (a sugar pill that should have no effect on vision), and then test their vision. In the second stage, you give them viagra and then test their vision. So now you have the same people in both conditions. Clearly your samples are related, so again the t-test from the last chapter isn’t appropriate.

In the first example, the situation has been decided for you, there is a pre-existing relationship (romantic relationship) between the two samples.

In the second and third examples, you, as the experimenter, make a decision to make the two samples related. Why would you ever want to do that? To control for individual differences that might add more noise (error) to your data. In Example 2, each individual acts as their own control.

 In a matched-subjects study, each individual in one sample is matched with a subject in the other sample. The matching is done so that the two individuals are equivalent (or nearly equivalent) with respect to a specific variable that the researcher would like to control. Sometimes this type of styd is called a related-samples design.
 A repeated-measures study is one in which a single sample of subjects is used to compare two (or more) different treatment conditions. Each individual is measured in one treatment, and then the same individual is measured again in the second treatment. Thus, a repeated-measures study produces two (or more) sets of scores, but each set is obtained from the same sample of subjects. Sometimes this type of study is called a within-subjects design.

Okay, so now we know that for repeated-measures and matched-subject designs we need a new t-test. So, what is the t statistic for related samples?

Again, the logic of the hypothesis test is pretty much the same as it was for the one-sample cases we've already considered. Once again we'll go through the same steps. However, the nature of the hypothesis, and how the tobs is computed will change from our one-sample case.

All of the tests that we've looked at are examining differences. In the previous lab we were interested in comparing a known population with a treatment sample. The t-test for this lab considers differences between scores from a related pair of subjects. Because the two scores for each pair are related, the differences are based on differences between each individual or matched pair.

Consider the following example:

 An instructor asks his statistics class, on the first day of classes, to rate how much they like statistics, on a scale of 1 to 10 (1 hate it, 10 love it). Then, at the end of the semester, the instructor asks the same students, the same question. The instructor wants to know if taking the stats course had an impact on the students' feelings about statistics.

The results of the two ratings are presented below. D stands for the difference between the pre- and post-ratings for each individual.

Note:
= the mean of the differences

 Student Pre-test (first day) Post-test (end of semester) D D- (D-)2 1 1 4 3 2 4 2 3 5 2 1 1 3 4 6 2 1 1 4 7 8 1 0 0 5 2 3 1 0 0 6 2 2 0 -1 1 7 4 6 2 1 1 8 3 4 1 0 0 9 6 6 0 -1 1 10 8 6 -2 -3 9 S 40 50 10 0 18 Differences SSD

Mean difference for the sample = = 10/10 = 1.0

Okay, now let's start our 5 step process of hypothesis testing.

Step 1: State your H0 and H1

Before we can state hypotheses, we need to know if this will be a one-tailed or a two-tailed test. All we are asking in this example is if taking statistics has an impact (any impact - either direction) on the students' feelings about statistics. Since no direction of impact is predicted, this will be a two-tailed test.

Now we're ready to state the hypotheses and set our decision criterion. For this example let's assume that a = 0.05. What is our H0? Conceptually it is similar to the one-sample t-test, because we've got a single population of differences to consider that will be represented by a single sample of differences. In other words, the distribution that we're interested in is the distribution of D, the distribution of the pre-test scores subtracted from the post-test scores. So our H0 will be a statement of population comparisons such that taking stats has no effect on a person's preference for statistics. If taking statistics has no effect, we would expect no difference between the pre-test scores and post-test scores, giving us a mean difference in the population of 0. So, we state:

H0: mD = 0

The H1 will state the opposite case, that taking statistics does have an impact. Therefore, our alternative hypothesis is:

H1: mD ¹ 0

Step 2: Set up the decision criterion

Two-tailed test

a = 0.05

With only one sample, our df = n - 1. So df = 10 -1 = 9. Finding tcrit is the same as usual, look at the table. a = 0.05, two-tailed, df = 9, tcrit = ＼ 2.262

Step 3: Collect the sample.

Our sample is given above in the table with sample mean = 1.0.

Step 4: Compute the tobs for your sample.

Okay, as was the case in last lab, the overall form of the t statistic equation is the same, but the details are a little different. For related samples we'll use:

So we already computed our , and we know mD = 0 (for the H0), so we just need to figure out what   is equal to. This is the estimated standard error of the difference distribution. So first we need to figure out the variance.

SSD = S (D - Dbar)2 = [(3-1)2 + (2-1)2 + (2-1)2 + (1-1)2 + (1-1)2 + (0-1)2 + (2-1)2 + (1-1)2 + (0-1)2 + (-2-1)2] = 18

 standard deviation of the differences

Now we can figure out the estimated standard error

Now we are read to compute our tobs

=(1-0)/0.45

= 2.24

Step 5: Compare tobs with tcrit to make a decision about our H0.

Our tobs does not fit in the critical region. We know this because tobs < tcrit (2.24 < 2.262). So we fail to reject the H0.

Okay, what about Hypothesis testing with a matched-subject design?

Basically we do things exactly as we did in the previous example, except now we subtract the matched control person's score from the experimental group person.

1. A major university would like to improve its tarnished image following a large on-campus scandal. Its marketing department develops a short television commercial and tests it on a sample of n = 7 subjects. People¨s attitudes about the company are measured with a short questionnaire, both before and after viewing the commercial. Was there a difference? Assume a = 0.05 level. Which test should be used? Follow five steps of hypothesis testing to solve the problem. Draw the distribution and indicate the rejection region(s). The data are as follows:

 Person X1 (before) X2 (after) A 15 15 B 11 13 C 10 18 D 11 12 E 14 16 F 10 10 G 11 19

2. An instructor asks his statistics class, on the first day of classes, to rate how much they like statistics, on a scale of 1 to 10 (1 = hate it; 10 = love it). Then at the end of the semester, the instructor asks the same students, the same question. The instructor wants to know if taking the stats course makes any difference on the students¨ feelings about statistics. Assume alpha = 0.05 level. Which test should be used? Follow five steps of hypothesis testing to solve the problem.

The data are as follows: n = 30, D-bar = 2, SD = 0.71.

3. An experimenter was interested in dieting and weight losses among men and women. It was believed that in the first 2 weeks of a standard dieting program, women would tend to lost more weight than men. As a check on this notion, random sample of 15 brother-sister pairs were put on the same strenuous diet. Their weight losses after 2 weeks showed the following. Follow five steps of hypothesis testing to solve the problem. Drew the distrition and indicate the rejection region(s). Assume a = 0.01 level.

 Pair Brother Sister 1 5.0 2.7 2 3.3 4.4 3 4.3 3.5 4 6.1 3.7 5 2.5 5.6 6 1.9 5.1 7 3.2 3.8 8 4.1 3.5 9 4.5 5.6 10 2.7 4.2

### Using SPSS to compute a related samples (paired samples) t-test

We can use SPSS to compute paired samples t-tests.

To set up a paired samples t-test you will need two columns of data, one for each sample (related samples) or one for each measurement (repeated measures).

 Go to the Analyze menu and select the submenu Compare Means. In this submenu you'll see several tests. The one that we're interested in today is paired samples t-test. After selecting Paired samples t-test, you'll get a window that looks like this. Here you should select the variables that you are testing. Click on each one to create Current Selections at the bottom, and then click the arrow to place the pair of variables in the box. Here is what the output will look like. Notice that the output includes the sample mean, the sample standard deviation, the standard error, the tobs (in the t column), the degrees of freedom, the mean difference (sample mean1 - sample mean2), and a p-value (sig.). Notice that SPSS doesn't tell you to reject or fail to reject the H0, nor does it give you the tcrit. To make your decision about the H0 you must compare the p-value with your a-level. If the p-value is equal to or smaller than the your a-level, then you should reject the H0, otherwise you should fail to rejet H0.

4. Enter the data of Q1 into SPSS. Test your H0 using a paired-samples t-test. Do you get the same result? Explain your SPSS result.  Explain your SPSS result, e.g., what is the standard error? What is the tobs? What is the p-value. Do you reject or fail to reject the null hypothesis? Why? Attach the output with your worksheet.

5. For a study concerned with the reading interests of women and their husbands, a sample of 18 college-educated married couples between the ages of 30 and 40 years was taken. Each individual in the sample was interviewed and asked how many books he or she had finished reading in the year just past. The results were as follows:

 Couple Wife Husband 1 1.4 1.1 2 7 2.2 3 8 1.5 4 6.6 8.1 5 4.3 2 6 5.1 3.2 7 3.2 5 8 4 4 9 5.2 7 10 2 0 11 4 1.1 12 6 3 13 8 12 14 5 3 15 8 2 16 6.1 9 17 4 2 18 5.2 6

Are wives and husbands significantly (alpha = .05) different in the average number of books read per year? Write the null hypothesis and the alternative hypothesis. Is this one-tailed or two-tailed test? Using SPSS to run the test, and report the results. What conclusions do you have?