Conducting and interpreting t tests

This document is a summary of the SPSS steps for t tests taken from the seminar handouts from weeks’ 4-6. Supplementary videos of the SPSS steps and how to report/interpret the appropriate test may be useful to watch as these videos go through the steps written within this document with example data.

Between-subjects data

Independent samples t test (between-subjects data and parametric assumptions met)

Welch’s t test (between-subjects data that violates the assumption of homogeneity of variance)

Mann-Whitney U test (between-subject data that violates the assumption of normal distribution)

Within-subjects data

Paired samples t test (within-subjects data and parametric assumption met)

Wilcoxon signed rank test (within-subjects data that violates the assumption of normal distribution)

1. Calculating and saving z scores

a) Splitting the data file

Note: We do not need to complete this step for within-groups data.

When we have between-groups data we need to split the data by condition to see if there are any outliers per condition. This is because the group a participant was allocated to was all entered within one column as it is nominal data. Therefore, we need to let SPSS know that we wish to look for outliers for each group separately before saving our z scores.

To do this:

1. Click Data > Split File

2. Select Organize output by groups from the options on the right-hand side.

3. Move the nominal variable into the Groups Based on box

4. Click OK

b) We now need to save the z scores.

To do this:

1. Click Analyze > Descriptive Statistics > Descriptives

2. Move the scale variable(s) into the Variables box

3. Check Save Standardized Values as Variables

4. Click OK

Minimise the output window that pops up and return to the data editor (the raw data spreadsheet). You should now have a new variable column that lists the z scores for each condition.

c) Outlier – Table

It can be helpful to check your z scores by creating a table with the minimum and maximum values in. This table can show the lowest and highest z score for your dataset so that you can determine if the values fall within -3 and 3.

To do this:

1. Click Analyze > Descriptive Statistics > Descriptives

2. Click Reset

3. Move the calculated z score values into the Variables box

4. Uncheck Save Standardized Values as Variables if this is still checked

5. Click options and uncheck mean and std. deviation.

6. Check minimum and maximum (usually default)

7. Click Continue

8. Click OK

Once you have completed the steps an SPSS output window will pop up. This will appear in front of the data editor (the raw data spreadsheet). You should be able to read the minimum and maximum z scores for each condition from the tables. For between-groups data you will have separate tables for each condition and for within-groups data it will be in one table.

Don’t close this window but minimise it and return to the raw data spreadsheet.

d) Removing the data split

Note: We do not need to complete this step for within-groups data.

Once you have the z score column and descriptive tables, please remove the split on the data if you have a between-groups data. This is really important otherwise SPSS will produce SPSS output incorrectly for the future steps of your analysis. To do this:

1. Click Data > Split File

2. Click Reset

3. Click OK

2. Calculating and interpreting descriptive statistics

a) Descriptive statistics – Table

We should now calculate some descriptive statistics.

To do this

1. Click Analyze > Descriptive Statistics > Explore

2. Select the scale variable(s) in the left-hand box

3. Click the arrow to move the variable(s) across to the Dependent List

4. For between-groups designs select the nominal variable in the left-hand box

5. Click the arrow to move it across to the Factor List

6. On the right-hand side click Plots, select None under Bloxplots, and select Histogram and uncheck Stem-and-Leaf under Descriptive.

7. Click OK

Once you have completed the steps an SPSS output window will pop up. This will appear in front of the data editor (the raw data spreadsheet).

From the descriptive statistics table you can report and interpret the mean and standard deviation for each condition.

You can report and interpret the normal distribution checks i) skewness and kurtosis values, these should be between -1 and 1, if they are not your data is not normally distributed ii) histograms, the shape should be approximately normal.

Note: You can add the distribution curve onto your histograms.

To do this:

1. Double click on the histogram so that it appears in a new window

2. Click on the ‘show distribution curve’

3. Close the chart editor window by pressing the ‘X’ at the top right of the window

4. The distribution curve will automatically be added to the histogram in your output window

For between groups data, if the normal distribution assumption check is not met you should run the Mann-Whitney U test.

For within-groups data, if the normal distribution assumption check is not met you should run the Wilcoxon Signed Ranks test.

From the descriptive statistics table you can report and interpret the rule of thumb check for homogeneity of variance for a between-groups design (remember there is also Levene’s check for this assumption).

Compare the Variance values between the groups. For groups that have equal sample sizes, the larger variance should not be more than four times the smaller variance. For groups that have unequal sample sizes, the larger variance should not be more than two times the size of the smaller variance. If these rules are not met, you do not have homogeneity of variance

Don’t close this window but minimise it and return to the raw data spreadsheet.

b) Descriptive statistics – Error Bar Graph

We can also visualise the descriptive statistics in graph form.

To do this:

1. Click Graphs > Legacy Dialogs > Error Bar

2. Select Simple and Summarise for Groups of Cases for between-groups data or Summaries for Separate Variables for within-groups data

3. Click Define

4. Move scale variable(s) into the Variable box

5. For between-groups designs move the nominal variable into the Category Axis box

6. Select Standard deviation in the Bars Represent box

7. Change the multiplier to 1

8. Click OK

Once you have completed the steps an SPSS output window will pop up. This will appear in front of the data editor (the raw data spreadsheet). You should be able to read the mean and standard deviation for each of the conditions from the graph.

3. Running the appropriate t test

Between-groups data

Assumptions met so far, you still need to check Levene’s check for homogeneity: In the Data Editor window, select Analyze > Compare Means > Independent-Samples T Test.

Move your dependent variable into the Test Variable box, and your groups variable into the Grouping Variable box.

Highlight the Grouping Variable box and click Define Groups to tell SPSS how your groups are specified. In most cases, this will mean Group 1 = 1 and Group 2 = 2.

Click Continue.

Make sure that the box is checked next to ‘estimate effect size’.

Levene’s check – homogeneity of variance

Focusing first on the rows of the independent samples t test (the middle table of the output), the decision whether to read from the top or bottom row depends on the homogeneity of variance assumption.

• If you do have homogeneity of variance, you should read from the top row.

• If you do not have homogeneity of variance, you should read from the bottom row. (The Levene’s Test for Equality of Variances, on the left of the table, is another way of checking this along with the rule of thumb from the variances in the descriptive statistics table; if the Sig. value is less than .05, you do not have homogeneity of variance and should read from the bottom row.)

Reporting and interpreting a between-subjects t test

Once you have decided which row to read from, you should look at the significance value for the t test.

• If you have a directional hypothesis, you report the one-sided p value.

• If you have a non-directional hypothesis, you report the two-sided p value.

Remember: a p value of less than .05 means that there is a significant difference between the groups.

Here are some examples of how you might write up these results in a lab report using the example output, under four different situations:

• If you have homogeneity of variance and a non-directional hypothesis:

An independent-samples t test revealed that scores in Condition A were significantly higher than those in Condition B, t(18) = 2.97, p = .008, d = 1.33, two-tailed test. There was a greater than large effect size.

• If you have homogeneity of variance and a directional hypothesis:

An independent-samples t test revealed that scores in Condition A were significantly higher than those in Condition B, t(18) = 2.97, p = .004, d = 1.33, one-tailed test. There was a greater than large effect size.

• If you do not have homogeneity of variance and have a non-directional hypothesis.

An independent-samples t test revealed that scores in Condition A were significantly higher than those in Condition B, t(15.99) = 2.97, p = .009, d = 1.33, two-tailed test. A Welch’s test was used as the homogeneity of variance assumption was violated. There was a greater than large effect size.

(Note: A Welch’s test is what is used to produce the scores on the bottom line.)

• If you do not have homogeneity of variance and have a directional hypothesis.

An independent-samples t test revealed that scores in Condition A were significantly higher than those in Condition B, t(15.99) = 2.97, p = .004, d = 1.33, one-tailed test. A Welch’s test was used as the homogeneity of variance assumption was violated. There was a greater than large effect size.

Within-groups data – assumption checks met

In the Data Editor window, select Analyze > Compare Means > Paired-Samples t test.

Move the variable containing scores from the first condition into the Variable1 column, and the variable containing scores from the second condition into the Variable2 column.

Click OK.

Reporting and interpreting a within-subjects t test

Interpretation of the output is very similar as for a between-subjects design, except there is only one row to read from. The t, df, and Sig. columns should all be interpreted and reported in the same way.

4. Saving and exporting the output

Finally, you want to make sure that you save all your hard work on this analysis, you will also be using this data again and so it is helpful to save it!

The output window (with the table/graphs) is the output that in the future would be included in appendices and so it is helpful to save this! In the output window select File > Save and save it to somewhere you will be able to access again.

You can also export the output as a word document to help to add it to appendices.

To do this:

1. Select File > Export

2. In the Export Output box, make sure Objects to Export is set to ‘All’.

3. Set Type to ‘Word/RFT’

4. Click Browse and choose a sensible location and name for the file

5. Click Save.

6. Click OK.

You now have the output as a word document.

For the raw data spreadsheet click on File > Save and save it to somewhere you will be able to access again.