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 hypotheses Determine your rejection rule Calculate the t-statistic Use your rejection rule to decide whether you Reject the null hypothesis Fail to reject the null hypothesis INDEPENDENT SAMPLES t-TEST Two-Tailed Test Hypotheses H0: m1 - m2 = 0 H1: m1 - m2 ≠ 0 INDEPENDENT SAMPLES t-TEST Two-tailed Rejection Rule If you are using the t-table, reject H0 ▪ ▪ if t(obt) > t(crit, a, n1 + n2 - 2) OR if t(obt) < -t(crit, a, 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: m1 - m2 ≤ 0 H1: m1 - m2 > 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, a, n1 + n2 - 2) If using the SPSS printout, reject Ho if p< .05. INDEPENDENT SAMPLES t-TEST One-tailed test where you believe the scores in sample 1 will be less than the scores in sample 2. The hypotheses are H0: m1 - m2 ≥ 0 H1: m1 - m2 < 0 INDEPENDENT SAMPLES t-TEST One-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, a, 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 X1, X 2 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 2 ( X ) SS X 2 n INDEPENDENT SAMPLES t-TEST Calculating the independent samples t-statistic: t obt X1 - X 2 SS1 SS2 1 1 n1 n2 - 2 n1 n2 Step 1. NOBODY PANIC! 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, a, 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-TEST Independent 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 X n X X 2 (X ) 2 SS = X n 2 Brand B 1,277 1,005 6 6 1,277 ÷ 6 = 212.833 1,005 ÷ 6 = 167.500 278,415 172,139 (1,277) 2 (1,005) 2 278,415 6,626.833 172,139 3,801.500 6 6 EXAMPLE OF INDEPENDENT SAMPLES t-TEST Now, for it! tobt X1 - X 2 SS1 SS2 1 1 n1 n2 - 2 n1 n2 212.833- 167.500 6,626.833 3,801.500 1 1 66-2 6 6 45.333 45.333 2.432 (1,042.833)(0.333) 18.635 RELATED SAMPLES t-TEST Two-Tailed Test Hypotheses H0 : mD 0 H1 : m D 0 Rejection Rule--Reject H0 if t(obt) > t(crit, a, N-1) OR if t(obt) < -t(crit, a, N-1) where N is the number of differences OR if the significance level on the SPSS printout is less than .05 RELATED SAMPLES t-TEST One-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 H0 : mD 0 H1 : m D 0 Rejection Rule--Reject H0 if t(obt) < -t(crit, a, N-1) OR if the significance level on the SPSS printout is less than .05 RELATED SAMPLES t-TEST One-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 H0 : mD 0 H1 : m D 0 Rejection Rule--Reject H0 if t(obt) > t(crit, a, N-1) OR if the significance level on the SPSS printout is less than .05. 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 onesample test. [Continued on next slide.] RELATED SAMPLES t-TEST D - mD SSD N ( N - 1) Step 2. Find the mean of the difference scores. t 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. 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. 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, a, 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-TEST Stuff we’ll need Differences D 272 N 6 D 272 ÷ 6 = 45.333 D 2 14,042 2 2 (272) ( D ) 14,042 1,711.333 SS = D 6 N 2 EXAMPLE OF RELATED-MEASURES t-TEST And now t D - mD SSD N ( N - 1) 45.333 - 0 45.333 6.002 1,711.333 7.553 6(6 - 1)