When to use relatedsamples ttest?
How to conduct relatedsamples ttest by hand?
How to run related sample ttest by SPSS?
Download Lab 14 Worksheet
In the prior lab we examined how to use a ttest 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 ttest from the last chapter isn’t appropriate. 
In the first example, the situation has been decided for you, there is a preexisting 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 matchedsubjects 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 relatedsamples design. 
A repeatedmeasures 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 repeatedmeasures 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 withinsubjects design. 
Okay, so now we know that for repeatedmeasures and matchedsubject designs we need a new ttest. 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 onesample cases we've already considered. Once again we'll go through the same steps. However, the nature of the hypothesis, and how the t_{obs} is computed will change from our onesample 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 ttest 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 postratings for each individual.
Note:
= the mean of the differences
Student 
Pretest 
Posttest 
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 
SS_{D} 
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 H_{0} and H_{1}
Before we can state hypotheses, we need to know if this will be a onetailed or a twotailed 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 twotailed 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 H_{0}? Conceptually it is similar to the onesample ttest, 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 pretest scores subtracted from the posttest scores. So our H_{0} 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 pretest scores and posttest scores, giving us a mean difference in the population of 0. So, we state:
H_{0}: m_{D} = 0
The H_{1} will state the opposite case, that taking statistics does have an impact. Therefore, our alternative hypothesis is:
H_{1}: m_{D} ¹ 0
Step 2: Set up the decision criterion
Twotailed test
a = 0.05
With only one sample, our df = n  1. So df = 10 1 = 9. Finding t_{crit} is the same as usual, look at the table. a = 0.05, twotailed, df = 9, t_{crit} = ＼ 2.262
Step 3: Collect the sample.
Our sample is given above in the table with sample mean = 1.0.
Step 4: Compute the t_{obs} 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 m_{D} = 0 (for the H_{0}), 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.
SS_{D} = S (D  Dbar)^{2} = [(31)^{2} + (21)^{2} + (21)^{2} + (11)^{2} + (11)^{2} + (01)^{2} + (21)^{2} + (11)^{2} + (01)^{2} + (21)^{2}] = 18
standard deviation of the differences
Now we can figure out the estimated standard error
Now we are read to compute our t_{obs }
=(10)/0.45
= 2.24
Step 5: Compare t_{obs} with t_{crit} to make a decision about our H_{0}.
Our t_{obs} does not fit in the critical region. We know this because t_{obs} < t_{crit} (2.24 < 2.262). So we fail to reject the H_{0}.
Okay, what about Hypothesis testing with a matchedsubject 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.
A major university would like to improve its tarnished image following a large oncampus 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, Dbar = 2, S_{D }= 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 brothersister 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
We can use SPSS to compute paired samples ttests.
To set up a paired samples ttest 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 ttest. 

After selecting Paired samples ttest, 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 t_{obs} (in the t column), the degrees of freedom, the mean difference (sample mean_{1}  sample mean_{2}), and a pvalue (sig.). Notice that SPSS doesn't tell you to reject or fail to reject the H_{0}, nor does it give you the t_{crit}. To make your decision about the H_{0} you must compare the pvalue with your alevel. If the pvalue is equal to or smaller than the your alevel, then you should reject the H_{0}, otherwise you should fail to rejet H_{0}. 
4. Enter the data of Q1 into SPSS. Test your H_{0} using a pairedsamples ttest. Do you get the same result? Explain your SPSS result. Explain your SPSS result, e.g., what is the standard error? What is the t_{obs}? What is the pvalue. 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 collegeeducated 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 onetailed or twotailed test? Using SPSS to run the test, and report the results. What conclusions do you have?