Introduction to SPSS

One of the reasons you may wish to do a hypothesis test is to determine whether there is a statistically significant difference between means, either for a single sample (in which case you would compare to a constant value) or for multiple independent or related samples (in which case you would compare between these different samples). Depending on the exact nature of the analysis different tests are required, and this page details the process for performing some of the most common ones using SPSS.

Conducting a one sample \(t\) test

A question you may wish to ask of the wider population is: Does this sample come from a population where the mean summer daily energy consumption is \(19\)kWh?

This question can be answered by following the recommended steps, as follows:

While the first three assumptions should be met during the design and data collection phases, the fourth assumption should be checked at this stage (for instructions on doing this in SPSS, see the The normal distribution page of this module). If the normality assumption is not met you can try transforming the data or conducting the One sample Wilcoxon signed-rank test instead (you can also use this test if you have an ordinal rather than continuous variable).

The output should look like this:

Conducting a paired samples \(t\) test

A question you may wish to ask of the wider population is: Is there a statistically significant difference between mean summer daily energy consumption and mean winter daily energy consumption?

This question can be answered by following the recommended steps, as follows:

While the first three assumptions should be met during the design and data collection phases, the fourth assumption should be checked at this stage (for instructions on doing this in SPSS, see the The normal distribution and Transformations pages of this module). If the normality assumption is not met you can try transforming the data or conducting the Wilcoxon signed rank test instead. You can also use this test if you have ordinal rather than continuous variables.

The output should look like this:

Conducting an independent samples \(t\) test

A question you may wish to ask of the wider population is: Is there a statistically significant difference in mean summer daily energy consumption for those with and without children?

This question can be answered by following the recommended steps, as follows:

While the first three assumptions should be met during the design and data collection phases, the fourth assumption should be checked at this stage (for instructions on doing this in SPSS, see the The normal distribution page of this module). If the normality assumption is not met you can try transforming the data or conducting the Mann-Whitney U test instead. You can also use this test if you have an ordinal rather than continuous dependent variable.

The output should look like this:

Conducting a one-way ANOVA

A question you may wish to ask of the wider population is: Is there a statistically significant difference in mean summer daily energy consumption for any of the different marital statuses?

This question can be answered by following the recommended steps, as follows:

While the first three assumptions should be met during the design and data collection phases, the fourth and fifth assumptions should be checked at this stage (for instructions on checking the normality assumption in SPSS, see the The normal distribution page of this module). Instructions on checking the equal variances assumption are included in the analysis stage.

If the normality assumption is not met you can try transforming the data or conducting the Kruskall-Wallis one-way ANOVA instead. You can also use this test if you have an ordinal rather than continuous dependent variable. If the equal variances assumption is violated you will need to use a Welch or Brown-Forsythe statistic instead.

The output should look like this:

  • From the first table we can see that the mean summer daily energy consumption in our sample for those who are single is \(19.28\)kWh, for those who are married it is \(24.21\)kWh and for those who classified their marital status as ‘Other’ it is \(22.29\)kWh. To test whether there are any statistically significant differences between these values, we need to refer to the third table and to the \(p\) value. Before this though, we need to use the second table to evaluate the fifth assumption using Levene’s test of homogeneity of variance. The \(p\) value to evaluate is the one in the ‘Based on Mean’ row, which is listed as ‘Sig.’. Since this \(p > .05\) (in fact \(p = .746\)), we can assume equal variances and therefore the fifth assumption for the test is met. If the fifth assumption is not met, you can go back through the menu and keep the previous selections, but this time also select either the Brown-Forsythe test or the Welch test in the Options dialogue box. The third table contains the \(p\) value to evaluate for the one-way ANOVA, and since \(p < .05\) (in fact \(p = .019\)) we can reject the null hypothesis and conclude that the mean summer daily energy consumption is significantly different for at least one of the marital status groups. To find out where the significant difference(s) lie you can conduct a post hoc test. While there are many different options to choose from, a common test to try is Tukey’s HSD test (alternatively, if the homogeneity of variance assumption is violated you can use the Games Howell test). To do this, go back through and keep the previous selections but also do the following:
    * select Post Hoc… from the right hand menu * select Tukey in the dialogue box * click on Continue * click on OK The output should be the same as previously, but with the addition of the tables below. Both of these tables indicate that the only significant difference in mean summer daily energy consumption is between the single and married groups. This is shown by the fact that the \(p < .05\) (in fact \(p = .014\)) for this pair in the first table, and by the fact that mean values for the single and married groups do not appear in the same column of the second table.