TWO-S
AMPLE t-
TESTS
TWO-SAMPLE t-TESTS
Independent versus Related Samples Your two samples are independent if you
randomly assign individuals into the two treatment groups.
Your samples are related if either▪Each person in sample A is matched to a partner in sample B (matched samples) OR▪Each person in the study is measured under both conditions (repeated measures)
INDEPENDENT SAMPLES t-TEST
The steps to conducting an independent samples t-test are:
State your research question hypothesesDetermine your rejection ruleCalculate the t-statisticUse your rejection rule to decide whether you
Reject the null hypothesisFail to reject the null hypothesis
INDEPENDENT SAMPLES t-TEST
Two-Tailed Test Hypotheses H0: = 0 H1: ≠ 0
INDEPENDENT SAMPLES t-TEST
Two-tailed Rejection Rule If you are using the t-table,
reject H0▪ if t(obt) > t(crit, , n1 + n2 - 2) OR ▪ if t(obt) < -t(crit, , n1 + n2 - 2)
If you are using the SPSS printout, reject H0 if p < .05
INDEPENDENT SAMPLES t-TEST
One-tailed test where you believe the scores in sample 1 will be greater than the scores in sample 2. The hypotheses are
H0: ≤ 0 H1: > 0
INDEPENDENT SAMPLES t-TEST One-Tailed Rejection Rule where
you believe the scores in sample 1 will be greater than the scores in sample 2.
If using the t-table, reject H0 if t(obt) > t(crit, , n1 + n2 - 2)
If using the SPSS printout, reject Ho if p< .05.
INDEPENDENT SAMPLES t-TESTOne-tailed test where you believe the scores in sample 1 will be less than the scores in sample 2. The hypotheses are
H0: ≥ 0H1: < 0
INDEPENDENT SAMPLES t-TESTOne-tailed Rejection Rule where
you believe the scores in sample 1 will be less than the scores in sample 2.
If using the t-table, reject H0 if t(obt) < -t(crit, , n1 + n2 - 2)
If using the SPSS printout, reject Ho if p < .05.
INDEPENDENT SAMPLES t-TEST
Calculating the independent samples t-statistic
1. Calculate the mean for each of the two samples
2. Calculate the sum of squares for each of the two samples. What’s a sum of squares? It’s the same as the formula for the variance, except don’t do the final step of dividing by n – 1. SS1 for the first sample and SS2 for the second
n
XXSS
22 )(
21, XX
INDEPENDENT SAMPLES t-TEST
Calculating the independent samples t-statistic:
Step 1. NOBODY PANIC!
2121
21
21
11
2 nnnn
SSSS
XXtobt
INDEPENDENT SAMPLES t-TEST
Step 2. Find the difference between the group means. Note: It doesn’t matter which group you designate as sample 1 and which as sample 2, AS LONG AS you take into consideration which group you mean when you set up your hypotheses and rejection rules. [Continued on next slide.]
INDEPENDENT SAMPLES t-TEST
Step 3a. Divide the number 1 by the number of observations in the first sample (n1).
Step 3b. Divide the number 1 by the number of observations in the second sample (n2).
Step 3c. Add the answers to Step 3a and Step 3b.
Refer to Step 1!
INDEPENDENT SAMPLES t-TEST
Step 4. Add the sum of squares for the first sample (SS1) to the sum of squares for the second sample (SS2). See slide #8 for information about calculating the sum of squares.
Step 5. Find the degrees of freedom by adding the number of observations in the first sample (n1) to the number of observations in the second sample (n2) and then subtracting the number 2. [Continued on next slide.]
INDEPENDENT SAMPLES t-TEST
Step 6. Divide your answer from Step 4 by the answer from Step 5.
Step 7. Multiply your answer from Step 6 to the answer from Step 3c.
Refer to Step 1.
INDEPENDENT SAMPLES t-TEST
Step 8. Take the square root of your answer in Step 7.
Step 9. Divide your answer from Step 2 by the answer from Step 8.
Compare your obtained t-statistic to the critical t-value from your rejection rule and decide the appropriate action.
INDEPENDENT SAMPLES t-TEST
Find the appropriate t (crit) from the t-table in the back of the book, using the correct bar at the top depending on a one-tailed or a two-tailed test, , and df = n1 + n2 - 2.
OR use the significance level shown on the SPSS printout. If it is less than .05, reject Ho.
Calculate t (obt) using the two independent samples t-test.
Make your decision based on your rejection rule.
EXAMPLE OF INDEPENDENT SAMPLES t-TESTIndependent Variable is brand of oven
(two brands)
Dependent Variable is hours it worked until failure.Brand A Brand B
237 208
254 178
246 187
178 146
179 145
183 141
EXAMPLE OF INDEPENDENT SAMPLES t-TEST
Stuff we’ll need
Brand A Brand B
X 1,277 1,005
n 6 6
1,277 ÷ 6 = 212.833
1,005 ÷ 6 = 167.500
278,415 172,139
SS =
X2X
n
XX
22 )( 833.626,6
6
)277,1(415,278
2
500.801,36
)005,1(139,172
2
EXAMPLE OF INDEPENDENT SAMPLES t-TESTNow, for it!
432.2635.18
333.45
)333.0)(833.042,1(
333.45
61
61
266500.801,3833.626,6
500.167833.212
112 2121
21
21
nnnnSSSS
XXtobt
RELATED SAMPLES t-TEST
Two-Tailed TestHypotheses
Rejection Rule--Reject H0 if t(obt) > t(crit, , N-1) OR if t(obt) < -t(crit, , N-1) where N is the number of differences
OR if the significance level on the SPSS printout is less than .05
0:
0:
1
0
D
D
H
H
RELATED SAMPLES t-TESTOne-tailed test where you believe the scores in sample 1 will be less than the scores in sample 2 (which means that the differences will tend to be less than 0).Hypotheses
Rejection Rule--Reject H0 if t(obt) < -t(crit, , N-1) OR if the significance level on the SPSS printout is less
than .05
0:
0:
1
0
D
D
H
H
RELATED SAMPLES t-TESTOne-tailed test where you believe the scores in sample 1 will be greater than the scores in sample 2 (which means that the differences will tend to be greater than 0).Hypotheses
Rejection Rule--Reject H0 if t(obt) > t(crit, , N-1) OR if the significance level on the SPSS printout is less
than .05.
0:
0:
1
0
D
D
H
H
RELATED SAMPLES t-TEST
Calculating the related samples t-statistic
Step 1. Find the difference between each pair of scores. Again, it doesn’t matter which sample you designate as 1 and which is 2, AS LONG AS you (a) consistently subtract sample 2 from sample 1, and (b) keep the order in mind as you set up your hypotheses and rejection rule.
From this point on, ignore the original scores and use only the difference scores (designed with a subscript D). The test is conducted pretty much the same as if it were a one-sample test. [Continued on next slide.]
RELATED SAMPLES t-TEST
Step 4. Divide your answer from Step 3 by N(N – 1).
Step 5. Take the square root of your answer from Step 4.
Step 6. Divide your answer from Step 2 by the answer from Step 5.
Compare this obtained t-value against the critical t-value from the rejection rule and decide the appropriate action.
)1(
NNSS
Dt
D
D Step 2. Find the mean of the difference scores.
Step 3. Find the sum of squares of the difference scores. Be sure to use N as the number of pairs of scores (or the number of difference scores) to do the division.
RELATED SAMPLES t-TEST
Find the appropriate t (crit) from the t-table in the back of the book, using the correct bar at the top depending on a one-tailed or a two-tailed test, , and df = N - 1.
OR use the significance level on the SPSS printout.
Calculate t (obt) using the related samples t-test.
Make your decision based on your rejection rule.
EXAMPLE OF RELATED-MEASURES t-TEST
Same data as before
Brand A Brand B Difference
Size 1 237 208 29
Size 2 254 178 76
Size 3 246 187 59
Size 4 178 146 32
Size 5 179 145 34
Size 6 183 141 42
EXAMPLE OF RELATED-MEASURES T-TESTStuff we’ll need
Differences
D 272
N 6
272 ÷ 6 = 45.333
14,042
SS =
D2D
N
DD
22 )( 333.711,1
6
)272(042,14
2
EXAMPLE OF RELATED-MEASURES t-TEST
And now
002.6553.7
333.45
)16(6333.711,1
0333.45
)1(
NNSS
Dt
D
D