Week 3 - Parametric Assumptions, and how to test for them Levene’s Test (Homogeneity of Variance) and Kolmogorov - Smirnov test Before using a parametric test on your data (e.g. t-test or ANOVA), we have to make sure the data meet the assumptions of parametric tests. There are various assumptions and each parametric and non-parametric test may have a unique set of assumptions. Two most frequently encountered assumptions of parametric tests are normality of data distribution and homogeneity of variance. As you work through the activities, remember that your screen may look a little different if you are using a MacBook or if you are using a different version of SPSS (this is absolutely fine). This handout will tell you: 1. What is parametric data? 2. How do we test for the properties of parametric data? a. SPSS walkthrough for: i. Kolmogorov-Smirnov Test (for normal distribution) ii. Levenes Test (for homogeneity of variance) 3. Exercises What is parametric data? a. Data measured on a scale, like cm’s measured with a ruler (called ratio-level data), or temperature which has scale but does not have a true 0 (called interval-level data) b. The data should be normally distributed: c. If you have more than one sample, the variance in each sample should be similar – this is called homogeneity of variance How do we test for the properties of parametric data? Data for the example shown underneath can be found on Canvas. The file containing the data is called ‘Example data week 3.sav’. You can use this data set to investigate whether it meets the assumptions of normality of data distribution and homogeneity of variance. Two frequently used tests that investigate these assumptions respectively are the KolmogorovSmirnov Test and the Levene’s Test. a. Interpreting the Kolmogorov-Smirnov Test for Normal Distribution i. Tests the null hypothesis that the distribution is normal ii. If significant then the data is NOT normally distributed – so we want p to be above 0.05 for this test because it means our data is not significantly different to a normal distribution. If p is below 0.05 this means our data is not normally distributed. b. Performing the Kolmogorov-Smirnov Test in SPSS: 1. Click on ANALYZE > DESCRIPTIVE STATISTICS > EXPLORE 2. Drag your dependent measure into the DEPENDENT LIST. If you have more than one group, drag your grouping variable into the FACTOR LIST. Make sure ‘Both’ is selected 3. Click on PLOTS 4. Check the boxes labelled: HISTOGRAM and NORMALITY PLOTS WITH TESTS 5. Click CONTINUE 6. Back in the Explore box, click ok The SPSS software will now open a separate window which shows the output for the selected procedure. The output should contain the following information: Descriptive statistics: means, medians, standard deviations, range, minimum, maximum etc. Histograms Observe that the ‘No Cloak’ group data does not APPEAR normal on the histogram. Tests of Normality To check whether the data is NORMALLY DISTRIBUTED, refer to the Kolmogorov-Smirnov test (K-S) 1. Find the TESTS OF NORMALITY TABLE 2. The K-S test for the two groups is not significant 3. So, in both groups the data is normally distributed. c. Interpreting the Levene’s Test for Homogeneity of Variance i. Levene’s tests the null hypothesis that each sample has a similar variance ii. If the samples DO have a similar variance, and satisfy the homogeneity of variance assumption, the Levene’s test will NOT BE SIGNIFICANT! In other words, we want p to be above 0.05. iii. If Levene’s test p value IS SIGNIFICANT, we CANNOT accept that the data meets the homogeneity of variance assumption d. Performing the Levene’s Test in SPSS i. The Levene’s test can be performed in the Explore option - Complete points from 1 to 3 as shown in point ‘b.’ (K-S) Parametric tests use the - Select ‘Untransformed’ in the ‘Plots’ option Mean to calculate - Press ‘Continue’ and ‘OK’ results. Therefore, we will interpret the ‘Based on Mean’ results. Test of Homogeneity of Variance Levene Statistic Mischievous Acts df1 df2 Sig. Based on Mean .545 1 22 .468 Based on Median .270 1 22 .609 Based on Median and with .270 1 21.754 .609 .440 1 22 .514 adjusted df Based on trimmed mean ii. The Levene’s test will also be performed whenever you carry out a parametric test called the t-test in SPSS. Underneath is an example of a t-test results (you don’t need to perform this analysis). iii. Note that the numeric results of the K-S and the Levene’s tests are typically not reported in a written format. However, it is typically necessary to write whether the assumptions were met. Exercises Output 1: Use Table 1 to answer the following questions: 1. Why do we perform a Kolmogorov-Smirnov test? 2. What is the significance level of the Kolmogorov-Smirnov test for: a. The emotion recognition score of the ASD group? b. The emotion recognition score of the Typical group? c. Are either of these values significant? 3. Is the data for the ASD group normally distributed? Why? 4. Is the data for the Typical group normally distributed? Why? Output 2: Use Table 2 to answer the following questions: 5. 6. 7. 8. 9. Why do we perform a Levene’s Test? What is the significance value for Levene’s test? Is the result of the Levene’s test significant? What t-test values would we report based on the findings from Levene’s test? Why would we report those values? See the “answers” document on this week’s canvas page, for the answers. Week 4 - Tests of Difference: Chi-Squared This handout will tell you: 1. What is the Chi-square test and when should you use it? 2. How to perform a Chi-square test in SPSS? a. Worked example: ‘Are males more likely to smoke than females?’ 3. Exercises What is the chi-square and when should you use it? Chi-Square is a non-parametric test of difference. Use this test if: 1. You want to know about differences between groups a. Are there more females than males studying Psychology? 2. You want to know whether there is an association between two categorical variables a. Is there an association between gender and smoking? 3. Your groups are independent – each observation only contributes to once cell of the analysis (e.g. gender). 4. You have categorical data (otherwise known as on the nominal level of measurement). a. For example, frequency or number of observations in a number of categories – e.g. 10 male versus 50 females enrolled in Psychology. 5. Your data violates parametric assumptions – i.e. your data is not normally distributed. How to perform a chi-square in SPSS? Worked Example: Are males more likely to smoke than females? The table underneath contains information about smoking status distributed by gender. This information can be entered in to SPSS providing that appropriate variables are constructed. In this example there are three variables, namely ‘smoking status’, ‘gender’, and ‘frequency’. In Point 2 illustrates these variables in SPSS ‘Variable view’. Point 3 illustrates these variables and the associated data in SPSS ‘Data view’ Male Female Smokes 25 12 Does not smoke 128 85 1. To learn how to perform a Chi-square test you may open the example data in this week’s Canvas folder and work through the steps detailed below. 2. Check that all relevant details are included in variable view (it should look like the screen below). You should add your own labels here too. Also check that the values are specified for ‘gender’ and ‘smokes’. Remember to assign the correct types of measures! 3. Click on data view and check that a row defines each cell of your frequency table (i.e. you should have 1 row for females who smoke, 1 for females who do not smoke, 1 for males who smoke and 1 for males who do not smoke). The total observed frequency of each category should be in the corresponding frequency column. Remember you can change from numerical to written variable labels by pressing 4. Click on the menu Data > Weight Cases. 5. Select Weight cases by > transfer frequency to the corresponding box > click OK. Note. In the output window SPSS will confirm whether the procedure was successful. From now on the Weight cases option will be on at all times. Remember to turn it off for a different analysis! 6. Click on Analyze > Descriptive Statistics > Crosstabs 7. Add gender to the Rows box > add smokes to the Columns box > click on Statistics. 8. Select Chi-Square > Click continue. 9. Next, select the Cells button Note that the Frequency variable is not included. We have already weighted our analysis by this variable in the earlier step so SPSS already knows that Frequency is the dependent variable we are interested in 10. Select Observed, Expected, Row, Column, Total and Standardized > Click continue. 11. Finally, click OK. Results Any large differences between the expected counts (by chance) and observed counts would suggest there was an association between gender and smoking. In this case the numbers are similar. p > 0.05 therefore the difference between gender and smoking is not statistically significant. You must report these results as shown below. How to report these results in APA format A Pearson Chi-Square was used to identify whether gender influenced smoking frequency. Results of the chi-square showed no significant difference in smoking frequency between genders (χ² (1) = .742, p = .389). Note: You can find the χ symbol on word by going to Insert > Symbol. You might need to look under More Symbols if you haven’t used this symbol before. Exercises A chi-square analysis was carried out to investigate the relationship between gender and smoking frequency, the SPSS output showing the results of the analysis is shown above. 1. What are the observed frequencies for men and women who did and did not smoke? Put the frequencies into a table (see question 5 for a template). 2. How would you report the results of the chi-square analysis in APA format? 3. Are the results of the chi-square significant? 4. What do these results show? 5. The table underneath shows how often men and women play football. Enter this data into SPSS following the same format as in the previous example. Play football Do not play football Male 60 70 Female 45 80 a. Perform a chi-square analysis on this data in SPSS b. What are the results of the chi-square? c. Are the results significant? d. What do these results mean? What can you conclude? See the “answers” document on this week’s canvas page for the answers. Week 5 - One Sample t-test This handout will tell you: 1. What is the one sample t-test and when you should use it? 2. How to perform a one sample t-test in SPSS? a. Worked example: ‘are first year Psychology students more intelligent than the norm?’ 3. Exercises What is the one sample t-test and when should you use it? The one sample t-test compares a population/sample mean to a known population (e.g. the mean normal IQ of 100, or chance level on a given task). Use this test if: Your data meets the assumptions of parametric tests a. Interval or ratio level data b. Normally distributed How to perform a one sample t-test in SPSS? Worked Example: Are first-year Psychology students more intelligent than the general population? 1. You should open the Example data in this week’s Canvas folder and work through the following steps. 2. Check all of the relevant information is presented in variable view. IQ should be defined and labelled. 3. Check that IQ scores have been added in one column in data view. 4. Click on Analyze > Compare Means > One-Sample T Test 5. Add IQ to the variable box > set the test value to 100 (population mean) > unselect estimate effect size this time (this is an additional feature) > click OK. The Test Value box is where you enter the known average you want to compare your data to. For example, in this case we know (from exploring sources about IQ testing) that the population mean for IQ is 100. In order to find out known averages/population means, you will occasionally need to search online and/or published articles to find this out. SPSS Version 28 gives two p values but don’t worry if your version of SPSS only gives one. If you need to calculate a onesided/one-tailed p value, it is half the two-sided p value (just divide it by 2). 0.001 is as good as it gets though! Chose the correct p value based on what you have predicted. p < 0.001 therefore there is a significant difference between the mean of the population (100) and the sample mean (124). How to report results of the one sample t-test: The mean IQ of a sample of first year Psychology students was compared to the mean IQ of the general population using a one sample t-test. Results of the t-test showed that the mean IQ of the first year Psychology students was significantly higher than the mean IQ of the general population (t (19) = 8.559, p < .001). Addition point: Effect size tells you how strong the effect is and there are different measures for this. This will be covered later in the course but you can do some additional reading on this now if you would like to. Exercises You want to know whether people can do your new emotion recognition test. There are 21 videos and 3 possible responses, which means that chance level is 7/21, or 33%. You decide that the best way of checking whether people can do this task is to see whether the mean correct score on this new task is significantly higher than the chance score of 7. Therefore, you decide to perform a one sample t-test, to compare the mean score on this new emotion recognition task to chance (7 – this is the number that goes in the test value box). 1. Go to this week’s section on Canvas and find ‘Exercise week 5’ 2. Check whether the data is normally distributed 3. Perform a one sample t-test comparing the mean emotion recognition score to chance level (7) 4. Report the results of the one sample t-test in APA format 5. Are these results of the one-sample t-test significant? 6. What do these results mean? See the “answers” document on this week’s canvas page for the answers. Week 6 - Wilcoxon Rank Sum Test This handout will tell you: 1. What is the Wilcoxon Rank Sum Test and when should I use it? 2. How do I perform a Wilcoxon Rank Sum Test in SPSS? a. Worked example: ‘Do the glucose blood levels in a sample of patients differ from the norm?’ 3. Exercises What is the Wilcoxon Rank Sum Test and when should I use it? The Wilcoxon rank sum test can be used as the non-parametric equivalent of the one sample t-test. Unlike the one sample t-test which uses means, the Wilcoxon rank sum test compares a sample median to a known population median (e.g. do the glucose blood levels in a sample of patients differ from the norm?). Use this test if: You want to compare a population/sample to another known population AND Your data DOES NOT MEET the assumptions of parametric tests: a. E.g. if it is NOT normally distributed How do I perform a Wilcoxon Rank Sum Test in SPSS? Worked Example: do the glucose blood levels in a sample of patients differ from the norm? 1. Open the example data file and work through the following steps. 2. Check that all relevant details are provided in variable view and add any aspects which are not (e.g. you should add the label ‘blood glucose level’). 3. Click on Analyze > Non-Parametric Tests > One Sample 4. Select your objective from the options available. As you would like a Wilcoxon Signed-Rank test chose Customized analysis. You will find additional information about what the options permit in the description box. Next, click on Fields 5. Select Fields and make sure blood glucose is in the test fields box. Then select Settings. 6. In Settings > Customize tests > Compare median to hypothesised (Wilcoxon SignedRank) > Enter the known median which in this case is 100) > Click Run Note that SPSS displays which types of measures are allowed for the analysis. Results Our null hypothesis states that there is no difference between our sample and the hypothetical median. The p < 0.05 so there IS a significant difference between the sample and population median. How to report results of the Wilcoxon Rank Sum Test: The median blood glucose of a group of patients was compared to the median blood glucose of the general population using a one sample Wilcoxon Rank Sum test. Results of the Wilcoxon Rank Sum test showed that the median blood glucose levels of the patient group significantly differed from the blood glucose levels of the general population (T = 782.5, p = .046). Exercises The distribution of hunter-gatherer population densities (N = 86) across all forest ecosystems worldwide is skewed to the right and is non-normal. The median is therefore the most reliable measure of central tendency. As such, the median population density (per 100 km) of forest hunter-gatherers is 7.38. An interesting question that we may want to ask is whether this value is an accurate estimate of the population density of forest hunter-gatherers on specific continents. For this example, we will look at the hunter-gatherer groups of the northern Australian forests (n = 13). 1. Go to this week’s section on Canvas and find ‘Exercise week 6’ 2. Perform a one sample Wilcoxon rank sum test comparing the median density of hunter gatherer groups in northern Australia to the median population density of hunter gatherer groups in general. 3. Report the results of the one sample Wilcoxon rank sum test. 4. Are the results of the test significant? 5. What do these results mean? See the “answers” document on this week’s canvas page for the answers. Week 7 – Independent Samples t-test This handout will tell you: 1. What is the independent samples t-test and when should I use it? 2. How do I perform an independent samples t-test in SPSS? a. Worked example: ‘Do women score higher on verbal reasoning than men?’ 3. Exercises What is the independent samples t-test and when should I use it? The independent samples t-test compares the means of two independent groups. For example: the mean score of men to the mean score of women, or the mean memory score of participants in one experimental condition (had coffee) to the mean memory score of participants in the other experimental condition (did not have coffee). Use this test if: You want to draw inferences regarding group differences Groups are independent of one another – participants only contribute to one data sample Your data meets the assumptions of parametric tests a. Interval or ratio level data b. Normally distributed c. Homogeneity of Variance How do I perform an independent samples t-test in SPSS? Worked Example: Do women score higher on a verbal reasoning task than men? 1. If you are using this handout to practice your knowledge you will benefit from opening the example data file in this week’s Canvas folder and work through the following steps. 2. Check whether all relevant details are included in the variable view. 3. Check data is in the correct format in data view. Remember that your groups should be coded as 1s and 2s, but you can alternate between seeing numerical data and labels using the button below. The box highlighted above is checked so labels are displayed. To switch back to numbers simply click this button again 4. Click on Analyze > Compare Means > Independent Samples T Test 5. Add Verbal Reasoning to the Test Variable box and Gender to the Grouping Variable box. Deselect estimate effect size unless you would like to include this. Then click on ‘Define Groups’. You may want to explore the various options that SPSS provides in the ‘Options’ box. For example, you can tell SPSS how to treat missing values in the Options box. For this exercise you don’t need to change any options. 6. Define your groups based on the numbers you assigned to them. For example, in this case Group 1 would be 1 (for female) and Group 2 would be 2 (for male). Different numbers can be assigned for different data sets. Note that some datasets may have more than two groups so you need to tell SPSS which two groups it should compare. Then click ‘Continue’. 7. Finally, click OK. The question marks have been replaced with your group numbers Results Descriptives for the two groups. Levene’s test is not significant so the data is homogenous, we can continue to use this row. SPSS Version 28 gives two p values but don’t worry if your version of SPSS only gives the 2-sided. In most cases you will use the two sided p value (when you have predicted that there will be a difference) rather than the one-sided p value (when you have predicted what this difference will be) How to report results of an independent samples t-test: Male and female verbal reasoning was compared using an independent samples t-test. This revealed that the mean verbal reasoning task score of females (M = 128.80, SD = 9.35) was significantly (t (38) = 3.519, p = .001) higher than the mean for males (M = 115.80, SD = 13.62). Exercises You want to know whether people with a developmental disorder are impaired on an emotion recognition task. You decide to compare the performance of those with autism to typically developing individuals on this task using an independent samples t-test. 1. Go to this week’s section on Canvas and find ‘Exercise week 7’ 2. Check whether the data for both groups is normally distributed 3. Perform an independent samples t-test comparing the mean emotion recognition scores of people with autism to typically developing individuals 4. Is Levene’s test significant? 5. What do the results of Levene’s test mean? 6. Report the results of the independent samples t-test 7. Are these results of the independent samples t-test significant? 8. What do these results mean? See “answers” document on this week’s canvas page for the answers. Week 8 - Mann Whitney U Test This handout will tell you: 1. What is the Mann Whitney U test and when should I use it? 2. How do I perform a Mann Whitney U test in SPSS? a. Worked example: ‘Do women score higher on verbal reasoning than men?’ 3. Exercises What is the Mann Whitney U test and when should I use it? The Mann Whitney U test is the non-parametric equivalent of the independent samples ttest. The Mann Whitney U test compares the medians of two independent groups. For example: the median heart rate of participants in one experimental condition (had sugar) to the median heart rate of participants in the other experimental condition (did not have sugar). Use this test if: You want to draw inferences regarding group differences Groups are independent of one another – participants only contribute to one data sample Your data is non-parametric a. Violates the assumptions of parametric tests i. Not normally distributed ii. Does not have homogeneity of variance b. Ordinal level data or above How do I perform a Mann Whitney U test in SPSS? Worked Example: Do women score higher on a verbal reasoning task than men? 1. You should open the example data in this week’s Canvas folder and work through the following steps. 2. Check all of the relevant details are included in variable view. 3. Check data is in the correct format in data view. Remember that your groups should be coded as 1s and 2s but you can alternate between seeing numerical data and labels using the button below. The box highlighted above is checked so labels are displayed. To switch back to numbers simply click this button again 4. Click on Analyze > Non-Parametric Tests > Legacy Dialogs > 2 Independent Samples 5. Add verbal reasoning to the test variable list > add gender to the grouping variable box > select Mann-Whitney U > click on define groups. 6. Define the groups you want to compare (e.g. 1 is the group number assigned to females and 1 is the number assigned to males) > Click continue. 7. Finally, click OK. Results p < .05 means there is a significant difference between males and females verbal reasoning scores. Females had a significantly higher mean rank than males. How to report results of a Mann Whitney U test: The verbal reasoning ability of females and males was compared to data were analysed using a Mann Whitney-U test. Results indicated that the median verbal reasoning score of females was significantly higher than the median verbal reasoning score for males ( U = 91.000, Z = -2.954, p = .003). Exercises You want to know whether people with a developmental disorder are impaired on an emotion recognition task. You decide to compare the performance of those with autism to typically developing individuals on this task using a Mann Whitney-U test, as the data do not meet the assumptions of parametric tests. 1. Go to this week’s section on Canvas and find ‘Exercise week 8’ 2. Perform a Mann Whitney-U comparing the median emotion recognition scores of people with autism to typically developing individuals 3. Report the results of the Mann Whitney-U test 4. Are these results of the Mann Whitney-U test significant? 5. What do these results mean? See the “answers” document on this week’s canvas page for the answers. Week 9 – Paired Samples t-test This handout will tell you: 1. What is the paired samples t-test and when should I use it? 2. How do I perform a paired samples t-test in SPSS? a. Worked example: ‘Does recall improve after attending “Hypnotic Memory Training” with Paul McKenna?’ 3. Exercises What is the paired samples t-test and when should I use it? The paired samples t-test uses the mean as a measure of central tendency. This parametric test is used when one sample of participants is tested twice on the same measure/s (e.g. the memory score of participants before and after memory training). Use this test if: You want to draw inferences regarding group differences Groups are related – participants contribute to both data samples Your data is parametric a. Normally distributed b. Interval or ratio level data How do I perform a paired samples t-test in SPSS? Worked Example: ‘Does recall improve after attending “Hypnotic Memory Training” with Paul McKenna?’ 1. You should open the example data file in this week’s Canvas folder and work through the following steps. 2. Check all of the relevant information is included in variable view. 3. Check that data is arranged for a repeated measures analysis in data view. This means that 1 row should equal 1 participants scores (1 column for before and 1 for after). Conditions should be listed across the top. Note the measure has been changed to scale 1 row = 1 participants scores. Each participant has two scores 4. Click on Analyze > Compare Means > Paired-Samples T Test 5. Transfer before memory training to variable 1 > transfer after memory training to variable 2 > click OK. The correlation is sometimes useful in helping to interpret the t-test result - the higher the correlation, the more power the t-test has. p < .05 meaning that there does appear to be a significant difference between the two condition! How to report results of a paired samples t-test: Scores obtained before and after memory training were analysed using a paired samples ttest. This revealed that scores obtained after brain training (M = 7.60, SD = 1.43) were significantly higher than those which were obtained before brain training (M = 6.80, SD = 1.28) (t (19) = -2.138, p = .046). Exercises You want to know whether people can achieve a significantly higher number of pull ups after taking part in bootcamp sessions twice every week for four weeks. You decide to perform a paired samples t-test comparing the number of pull ups attained before undertaking the bootcamp training to the number of pull ups attained after four weeks of training. 1. Go to this week’s section on Canvas and find ‘Exercise week 9’ 2. Perform a paired samples t-test comparing the mean amount of pull ups before to mean pull ups after the bootcamp. 3. Report the results of the t-test 4. Are these results of the t-test significant? 5. What do these results mean? See “answers” document on this week’s canvas page for the answers. Week 10 – Wilcoxon Signed Rank Test This handout will tell you: 1. What is the Wilcoxon signed rank and when should I use it? 2. How do I perform a Wilcoxon signed rank in SPSS? a. Worked example: ‘Does a drug lead to a significantly higher number of hours of sleep compared to a placebo?’ 3. Exercises What is the Wilcoxon signed rank and when should I use it? The Wilcoxon signed rank uses the median as a measure of central tendency. This nonparametric test is used when one sample of participants is tested twice on the same measure/s (e.g. the memory score of participants before and after memory training). Use this test if: The same group of participants is tested twice; You want to investigate group differences between the two times; Your data does not meet the assumptions of parametric tests: a. Not normally distributed b. Ordinal level data or above. How do I perform a Wilcoxon signed rank in SPSS? Worked Example: ‘Does a drug lead to a significantly higher number of hours of sleep compared to a placebo?’ 1. You should open the example data in this week’s Canvas folder and work through the following steps. Question: Are these types of 2. Check that all relevant information is included in variable view. measures assigned correctly? 3. Check that the data is arranged for a paired samples analysis in data view. This means that 1 row should equal 1 participants scores (1 column for the number of hours sleeping after being administered with the drug and 1 for the number of hours sleeping after the placebo). 1 row = 1 participants scores. Each participant has two scores. 4. Click on Analyze > Non-Parametric Tests > Legacy Dialogs > 2 Related Samples 5. Transfer hours sleeping after the drug to the Variable 1 > Transfer hours sleeping after the placebo to the Variable 2 box > Select Wilcoxon > click OK. P < .001 meaning that there is a significant difference between the number of hours participants slept after receiving a drug compared to how long they slept after receiving a placebo How to report results of a Wilcoxon paired samples: A Wilcoxon signed rank test was performed to investigate whether a drug would cause participants to sleep for more time than when they received a placebo. Results indicated that participants slept for significantly more hours after receiving the drug compared to when they received a placebo (z = -3.648, p < .001) Exercises You want to know whether people are able to attain a significantly higher number of pull ups after taking part in a bootcamp session every week for 4 weeks. You decide to perform a Wilcoxon signed rank test comparing the number of pull ups attained before undertaking bootcamp training to the number of pull ups attained after 4 weeks of bootcamp training, as the data does not meet assumptions of parametric tests. 1. Go to this week’s section on Canvas and find ‘Exercise week 10’ 2. Perform a Wilcoxon signed rank test comparing the mean pull ups attained before bootcamp to the mean pull ups attained after bootcamp. 3. Report the results of the Wilcoxon signed rank test 4. Are these results of the Wilcoxon signed rank test significant? 5. What do these results mean? See the “answers” document on this week’s canvas page for the answers.