1 / 21

Lesson 8 in SPSS

Lesson 8 in SPSS. How to conduct Two-sample t -tests in SPSS. Two independent Samples--The Dataset. In this dataset, we have two variables—oven and lifetime There are 12 scores in the dataset—6 for brand 1 and 6 for brand 2.

alta
Download Presentation

Lesson 8 in SPSS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lesson 8 in SPSS How to conduct Two-sample t-tests in SPSS

  2. Two independent Samples--The Dataset • In this dataset, we have two variables—oven and lifetime • There are 12 scores in the dataset—6 for brand 1 and 6 for brand 2. • For these 12 ovens, we’ve measured the number of hours it has worked until failure. • We want to see if there is a difference in the mean lifetimes of the two brands.

  3. First Decisions • The first decision we have to make is whether we have an independent samples or a related samples experiment. Because there has been no matching (we didn’t pair up a Brand 1 oven with a partner Brand 2 oven) and we haven’t repeatedly measured the same oven, we need to do an independent measures t-test. • Do we want to use a one-tailed or a two-tailed test? Because we have no evidence to suggest that one brand is better or worse than the other, we’d better stick to a two-tailed test. That way, we’ll know if there is a significant difference in either direction. • Let’s state our hypotheses: • Null hypothesis H0: m1 – m2 = 0. • Alternative hypothesis Ha: m1 – m2 ≠ 0.

  4. Selecting the Analysis • From the SPSS menu bar, choose • Analyze • Compare means • Independent Samples T Test

  5. Select the Variables • The dependent variable goes in the Test Variable box. In this case, we were measuring the variable Lifetime. • The independent variable goes in the Grouping Variable box. Here, it’s the brand of oven. Notice the question marks in the Grouping Variable next to oven. We need to specify the values for the two brands.

  6. Grouping Variable • Notice that when you enter the Grouping Variable, the Define Groups box becomes active. • Then, when you click on Define Groups, this box will appear.

  7. Defining Groups • From slide #2, we know that our two ovens were designated by the values 1 and 2. • These are the values we want to enter to indicate the two different treatment groups for our experiment. • Now click on Continue.

  8. Running the Analysis • Now we can click on OK.

  9. The Output • The first part of the output gives us basic statistics about our two brands of ovens. As we can see, there were 6 ovens of each brand. Brand 1 had an average lifetime of 212.83 hours, while brand 2 had an average lifetime of only 167.50. The t-test will help us determine if this is a statistically significant difference or a difference that could have occurred just by chance. • We also can see that the standard deviation for the first group is 36.406 and the standard deviation for the second group is 27.474. • Since one of the assumptions of a t-test is that the variances for the groups are about equal, we’ll need to do a test to be sure this is the case.

  10. The Output • And here’s the test that does just that. It’s called a Levene’s test for equal variances. • The null hypothesis says • that the group means are • NOT significantly different • from each other. • As you can see here, the significance on this test is .072, which is bigger than .05, so we fail to reject the null hypothesis and conclude that the group variances are not significantly different. And that’s a GOOD thing!

  11. The Output • This is the t-test result. Because our Levene’s test was not significant, we get to use the top line. This represents a standard two-sample t-test. • Notice that because there were 6 ovens in each brand, there are 6 + 6 – 2 = 10 degrees of freedom (df). • Our t-value is 2.431. To the right of the degrees of freedom column, we see that SPSS gives us the significance level of our test. We want that to be less than .05 in order for the test to be significant.

  12. The Output In this case, we can see that our significance level is .035, which is less than .05. So we know that we would reject our null hypothesis that there is no significant difference in the lifetime of the two oven brands and accept our alternative hypothesis that there is a significant difference in the lifetimes of the two oven brands. Because the average lifetime of the first brand was 212.83 and the average lifetime of the second brand was 167.50, we can say that the first brand has a significantly longer lifetime than the second brand. So if you’re in the market for an oven, you’re probably going to want to buy the first brand, as opposed to the second!

  13. Related Samples t-Test • Suppose that instead of just randomly taking 6 ovens from each brand, we matched an oven from Brand A with a comparable oven from Brand B based on price. We would now have a related samples t-test. • To do this in SPSS, we have to arrange our data differently. Here, we have the lifetime score for the “top of the line” Brand A immediately next to the lifetime score for the “top of the line” Brand B. Each Brand A machine is paired according to price with a comparative Brand B model. By the time we get to the 6th oven for each brand, we’ve got their “bargain basement” models.

  14. Related Samples t-Test • This time, we want to select • Analyze • Compare Means • Paired Samples T Test

  15. Related Samples t-Test • We now have to tell SPSS which variables are to be “paired.” In this instance, its Brand A versus Brand B.

  16. Related Samples t-Test • But this time, we have to highlight BOTH variables before we can click on the arrow to move them into the Paired Variables box.

  17. Related Samples t-Test • How the screen appears AFTER you’ve clicked the right arrow. • Now you can click on OK

  18. The Output • SPSS does the same thing you would do. That is, it finds the difference between each pair of scores and then conducts what is essentially a one-sample t-test on those differences. Because of this, we don’t have to worry about possible differences in the variances of two samples and we don’t need to have the Levene’s test. • Again, the first thing we see is a basic descriptive statistics block.

  19. The Output • The next block gives us information about the relationship between the two sets of scores. We won’t worry about this now.

  20. The Output • Here’s the part where we really want to focus our attention. Notice that I’ve deleted a bunch of stuff from the middle. • Because we had 6 pairs of scores, our degrees of freedom (df) equal 6 – 1 = 5. • Our t-value is 6.002. Notice how, using exactly the same scores we used before but with a related samples t-test, our significance level is a much stronger .002. That is, this .002 is much smaller than .05 so we know there is significant difference in the average lifetimes of the two brands, when matched according to price range.

  21. The Output • Now for the stuff in the middle we left out earlier. Once we know that we have a significant t-test, it is appropriate to consider a “confidence interval” around the mean. • In this case, we know that the mean of the difference scores was 45.333. But we also know (don’t we) that this was based on a sample. The actual mean for the population of difference scores would be different. • We can build a box around that sample mean that we are 95% confident contains the true population mean. Here, that box would go from a low of 25.918 to a high of 64.748, with the sample mean of 45.333 right in the middle.

More Related