Spss Lab 7: T-tests Sectio I this lab, we will be usig everythig we have leared i our text ad applyig that iformatio to uderstad t-tests for parametric ad oparametric data. THERE WILL BE TWO SECTIONS FOR THIS LAB, EACH CONTAINING TASKS TO COMPLETE. SEE ME WHEN YOU FINISHE ONE SECTION TO RECEIVE THE NEXT SECTION. Task : Your Data Go to our course webpage (http://laura.goadrich.com/stats/lab.html). Uder the lab sectio you will fid SpiderRM.sav ad SpiderBG.sav The data is arraged as if the same participats were used i each coditio (so each participat was exposed to a picture of a spider ad their axiety was measured, ad at some other time the same participats were exposed to the real spider ad their axiety was measured agai). Each row i the data editor represets a differet participat s data.. Dowload SpiderRM.sav (RM is for repeated measures) ad SpiderBG.sav (BG is for betwee group) to your computer to use for the assigmet.. Create a Word file Lab7.doc to put your solutios to the tasks below. Put your ame at the top of the file. Task : Depedet t-test Costructig a depedet t-test is very straightforward i SPSS. Usig SpiderRM.sav, access the mai dialogue box by. Goig to Aalyze -> Compare Meas -> Paired-Samples T Test. Select the two variables from the list (at the same time, so they are both highlighted i blue) ad move them to the box labeled Paired Variables usig the arrow. At this poit, if you wat to carry out several t-tests the you would select aother pair of variables, trasfer them to the variables list, ad the select aother pair ad so o. 3. Click o the Optios butto 4. I the ew dialogue box, chage the cofidece iterval to 99% 5. Click OK 6. Copy your three charts from the Output widow to your Word documet. Aswer the followig questios i your Word documet: a. What is the risk of chagig the cofidece iterval from 95% to 99%? b. Lookig at the first table created, is the Paired Sample Statistics table showig you the results from idepedet-meas or repeated-measures? ~Page ~
c. Usig the results from the same table, Paired Sample Statistics, describe the differeces i the data created by the picture of the spider ad the real spider. d. Lookig at the last table created, is the Paired Sample Test table showig you the results from idepedet-meas or repeated-meas? e. Usig the results from the same table, Paired Sample Test, describe the differeces i the data created by the picture of spider ad the real spider. f. Usig what you have leared, o average, which participats experieced sigificatly greater axiety? Justify your aswer by discussig the t-score ad the chose alpha value. Task 3: Idepedet t-test Costructig a idepedet t-test is very straightforward i SPSS. Usig SpiderBG.sav, access the mai dialogue box by. Go to Aalyze -> Compare Meas -> Idepedet Samples T Test. Oce the dialog box is activated, select the depedet variable from the list (axiety) ad trasfer it to the box labeled Test Variable(s) by usig the arrow. 3. Next select the idepedet variable (group) ad the trasfer it to the box labeled Groupig Variable. 4. Click the butto for Defie Groups 5. Eter 0 for the Group (the picture group) 6. Eter for the Group (the real group) 7. Click Cotiue 8. Click OK 9. Copy your ew tables to your Word documet. Aswer the followig questio i your Word documet: g. What differeces do you otice i your Group Statistics table ad your Paired Sample Statistics (the first table you copied for the lab) table? The secod table cotais the mai test statistics. Oe row is labeled Equal variaces assumed while the other is labeled Equal variaces ot assumed. This has to do with the equal variace assumptio; we oly have to pay attetio to the first row. We wat to compare the results i Sig.(-tailed) colum with the data i the t colum (the t-value). Aswer the followig questio i your Word Documet: h. What ca you ifer about the axiety caused by the pictures ad by real spiders? ~Page ~
Spss Lab 7: T-tests Sectio Sometimes our data does ot fit the ormal curve (o-parametric data). I class you were give a hadout about two tests that are alteratives to our idepedet t-test ad hadle oparametric data. Task 4: Your Data For this sectio, you will eed to create your data set with its associated values. The study results that you are eterig are from a eurologist that carried out a experimet to ivestigate the depressat effects of certai recreatioal drugs. She tested 0 clubbers i all: 0 were give a Ecstasy tablet to take o Saturday ight ad 0 were allowed oly to drik alcohol. Levels of depressio were measured usig the Beck Depressio Ivetory (BDI) the day after ad midweek. To create your SPSS data,. Ope SPSS ad create a ew Data file.. Save the file as lab7.sav 3. Add your variables: Name Label Drug Type of Drug subdi Beck Depressio Ivetory (Su) wedbdi Beck Depressio Ivetory (Wed) 4. Ad your associated values: Drug subdi wedbdi Ecstasy 5 8 Ecstasy 35 35 Ecstasy 6 35 Ecstasy 8 4 Ecstasy 9 39 Ecstasy 7 3 Ecstasy 7 7 Ecstasy 6 9 Ecstasy 3 36 Ecstasy 0 35 Alcohol 6 5 Alcohol 5 6 Alcohol 0 30 Alcohol 5 8 Alcohol 6 9 Alcohol 3 7 Alcohol 4 6 Alcohol 9 7 Alcohol 8 3 Alcohol 8 0 ~Page 3~
Task 5: Uderstadig simplified data (To uderstad this sectio, you must read the packet I gave you coverig the Wilcoxo ad Ma-Whitey tests.) Both of the tests you are about to do work very similarly. First imagie that there is o differece i depressio levels betwee Ecstasy ad Alcohol users. Suppose we were to rak the data igorig the group to which a perso beloged from lowest to highest (i.e. give the lowest score a rak of ad the ext lowest a rak of etc.). Aswer the followig questio i your word documet: i. If you summed the raks of both groups separately (give the above coditios), what umber of high ad low raks would you expect i each group? j. What about the summed total of raks i each group? Now let s thik about what would happe if there was a differece betwee the groups. Let s imagie that people i the Ecstasy group are more depressed tha the people i the Alcohol group. Aswer the followig questio i your word documet: k. If you summed the raks of both groups separately (give the above coditios), what umber of high ad low raks would you expect i each group? l. What about the summed total of raks i each group? The Ma-Whitey ad Wilcoxo rak-sum tests both work o this priciple. I fact, whe the groups have uequal umbers of participats i them the the test statistic for Wilcoxo s rak-sum test is simply the sum of the raks i the group that cotais the fewer people; whe the group sizes are equal it s the value of the smaller summed rak. Task 6: Uderstadig our data Let s apply this rakig idea to our data set ad watch what happes. First we will eed to add some more variables to lab7.sav. After subdi, add surak ad suactualrak.. Similarly after wedbdi, add wedrak ad wedactualrak. 3. Sort the Wedesday scores i ascedig order 4. Now assig raks i wedrak from (for the smallest value) to 0 (for the largest value) Now we wat to assig the actual raks for the wedbdi values. This will ot always match up with the wedrak values because whe the scores occur more tha oce i the data set (e.g. i these data a score of 6 occurs twice ad a score of 35 occurs three times). These tied raks eed to be give all the same ~Page 4~
rak. So assig a rak that is the average of the potetial raks for those scores. For example, with the 6s, you would take (3 + 4)/=3.5; so uder wedactualrak for the wedbdi values of 6 ad 6, you would type 3.5 ad 3.5 5. Assig the appropriate values for wedactualrak After you ve raked the data, add up all the raks for the two groups. Aswer the followig questios i your Word documet: m. What is the sum of raks for the Alcohol group?. What is the sum of raks for the Ecstasy group? We take the lowest of these sums to be our test statistic. Aswer the followig questios i your Word documet: o. So, what is the test statistic for Wedesday? Repeat the process above (steps -5) to calculate surak ad suactualrak. I SPSS Data View, select all your data ad copy it (Edit -> Copy). Go to your Word Documet ad paste the data ito it (Edit -> paste). With the data still highlighted, create a table aroud it (Table -> Isert -> Table) Aswer the followig questios i your Word documet (about the Suday group): p. What is the sum of raks for the Alcohol group? q. What is the sum of raks for the Ecstasy group? r. So, what is the test statistic for Suday? Task 7: Sigificace usig the Wilcoxo rak-sum test Now we eed to determie whether this test statistic is sigificat. Give is the sample size of group (Alcohol) ad is the sample size of group (Ecstasy) Calculate the mea = ( ) + + ( + + ) Ad stadard error = Aswer the followig questios i your Word documet: s. What is the mea ad stadard error? t. Now use a z-score to covert the test statistic to a z-score for both Suday ad Wedesday. u. What is your critical value whe p<0.05 for a two-tailed test? ~Page 5~
v. Is there a sigificat differece betwee the groups o Wedesday ad/or Suday? Task 8: Sigificace usig the Ma-Whitey test This test is basically the same to with Wilcoxo rak-sum test, but your sigificace formulas will be reduced to oe. Give is the sample size of group (Alcohol) ad is the sample size of group (Ecstasy) R = the sum of raks for Ecstasy data for the give day R = the sum of raks for Alcohol data for the give day Test statistic for the Alcohol data: Test statistic for the Ecstasy data: + + ( + ) R + R ( ) Aswer the followig questios i your Word documet: w. What is the value for the test statistic for the Suday Ecstasy data? x. What is the value for the test statistic for the Suday Alcohol data? y. Usig the Ma-Whitey U table (Appedix B.9A i your text), what is your critical value whe p<0.05 for a two-tailed test? z. Is there a sigificat differece betwee the Ecstasy ad Alcohol groups o Suday? aa. Repeat the above aalysis (w through z) for Wedesday. Task 9: Ma-Whitey U-test & Wilcoxo siged-raks test Now let s have SPSS do the work for us.. Ope your lab7.sav. Click o Aalyze -> Noparametric Tests -> Idepedet Samples 3. Add subdi ad wedbdi to the box labeled Test Variable List by highlightig the variable ad clickig the arrow. 4. Select drug as the idepedet variable by highlightig it ad clickig the appropriate arrow to move it to the box labeled Groupig Variable. 5. Click o the Defie Groups butto SPSS eeds to kow what umeric codes you assiged to your two groups. We coded the Ecstasy group as (so put a i group ) ad the Alcohol group as (so put a i group ). 6. Click Cotiue 7. Uder Test Type, you should have a check mark ext to Ma-Whitey U 8. Click OK ~Page 6~
Copy your two charts from your output widow to your Word documet. Aswer the followig questios i your Word documet: bb. Lookig at the charts you copied, do your results from task 7 & 8 match (if ot they should)? cc. How ca you determie if there was a sigificat differece based o the charts aloe? Task 0: Wrap-up Prit out Lab7.doc ad sig the hoor code. Tur i your electroic versio of Lab7.doc via blackboard ad the paper copy to Laura by the ed of the lab sessio. ~Page 7~