Today we'll be moving out of the world of Excel and entering the world of SPSS. In many ways, the programs look alike, but SPSS is designed for statistics, so some of the more complicated procedures will be easier in it than in Excel. A million times easier. There is the annoying issue of multiple windows, however. Your output will appear in a separate "output" window (save it in the Studentwork folder as soon as it appears, which it will as soon as you ask SPSS to do something) which you will have to find, usually hiding behind the data window. ONE SAMPLE STATISTICS We'll begin with the easy stuff. Open the fruitfly.sav datafile (from the Datasets folder) in spss (this data set was described in the handout from Thursday). Let’s look at lifespan first. Do sexually active fruit flies live longer than fruit flies that are not sexually active? Remember that all of the flies in our sample are sexually active, just not all to the same degree. Use the “GRAPHS” menu to make a HISTOGRAM of the lifespan. Does it look normally distributed? Are there outliers? Now let’s look at the sample statistics. Go to ANALYZE -> DESCRIPTIVE STATISTICS -> DESCRIPTIVES and put in the lifespan variable. Get the mean and standard deviation. See if you can figure out how to get the mode. Our data only includes information about fruit flies that have at least one partner. Thus, the mean and standard deviation found in the previous step is for fruit flies with at least one partner. Do we think this mean is significantly less than 63.5 (the lifespan in days of fruit flies that are not sexually active)? Go to ANALYZE -> COMPARE MEANS -> ONE SAMPLE T TEST. Put in 63.5 for the test value. SPSS will give you a sweet little t-test output table. See if you can figure out what all those numbers mean. Create a 95% confidence interval for the mean lifespan score. To do this, do the one-sample test again but this time put in 0 for the test value and look at the “confidence interval for the difference”. TWO SAMPLE STATISTICS part I Do fruit flies with only 1 sexual partner live longer than those with 8 sexual partners? Do they sleep longer? First, let’s plot our data. Use the “GRAPHS” menu to make box-plots of lifespan and sleep for the two groups (1 vs. 8 sexual partners). Go to GRAPHS -> BOXPLOT -> select Clustered, Summaries of separate variables. Put lifespan and sleep for ‘Boxes Represent.’ Put Partner as the Category Axis. Are they both normally distributed? Now let’s run our t-tests. Go to ANALYZE -> COMPARE MEANS -> INDEPENDENT SAMPLE T TEST. Put in lifespan for the test variable and partner for the grouping variable (you’ll have to define the groups as 1 and 8). A few things you will see – Levene’s test for equality of variances tells you whether the variance of one group is significantly greater than that of the other group (if it is, the traditional t-test is inappropriate). Then you see the tstatistic, the degrees of freedom, the p-value, the mean difference, the standard error of the difference, and the confidence interval. Is the difference in lifespan for 1 vs. 8 sexual partners significant? Do the same for sleep and length – are those differences significant? What would the 90% confidence interval be for length? [Hint: Because equal variances can be assumed, use the corresponding pooled standard error for your calculations. You can find the appropriate standard error value in the SPSS output. Also, remember to use the appropriate df given that equal variance is assumed.] Is the difference in length between fruit flies with one sexual partner and eight sexual partners significant with 90% confidence? Suppose there were fewer fruit flies in the sample (15 with one sexual partner, and 14 with eight sexual partners). Create a new confidence interval for length with the reduced n. Assume that the mean and standard deviation remain the same. [Hint: you will need to calculate this by hand.] Imagine that the standard deviation for length was reduced to .02 for the group with only one partner, and to .01 for the group with eight partners. What would the new t value be given the change in variability? Is the difference in length significant? [Hint: you will need to calculate this by hand.] PAIRED SAMPLE STATISTICS For this, we'll turn to the Claudia data set that is described in some detail in a separate handout. We will be exploring this data set in future labs, so read that handout carefully, so that you have an idea of what all the variables are. Today we will be focussing only on the first few columns – specifically, sex, location, perform1, perform2, and perform3. Did the children perform better on the second problem set than on the first? Did they perform better on the third than on the second? Or worse? How about the third relative to the first? Look at the histograms for each of these three variables. What do you think? Now let’s run a t-test. Go to ANALYZE -> COMPARE MEANS -> PAIRED SAMPLE T TEST. Put in perform1 and perform 2 as variables 1 and 2 and use the arrow to move them into the center box. Hit okay and see the results. Do the same for the other two pairings. Did performance change at all across the three problem sets? Why are we using a paired-sample t-test here? TWO SAMPLE STATISTICS part II Is there a gender difference in how children performed? Is there a location difference? First, let’s plot our data. Use the “GRAPHS” menu to make a box-plot of perform1 for the two genders and another box-plot for the two levels of location. Use a histogram if you prefer, or, plot both and see how they compare. Now let’s run our t-tests. Go to ANALYZE -> COMPARE MEANS -> INDEPENDENT SAMPLE T TEST. Put in perform1 for the test variable and gender for the grouping variable (you’ll have to define the groups as 0 and 1). Is the gender difference significant? Do the same for location – is it significant? Why are we not using a paired-sample t-test here?