Chi-Square & T-Test

The computation of the Chi-Square statistic can be accomplished by clicking on [Statistics => Summarize => Crosstabs...]. This particular procedure will be your first introduction to coding of data, in the data editor. To this point data have been entered in a column format. That is, one variable per column. However, that method is not sufficient in a number of situations, including the calculation of Chi-Square, Independent T-tests, and any Factorial ANOVA design with between subjects factors. I'm sure there are many other cases, but they will not be covered in this tutorial.  Essentially, the data have to be entered in a specific format that makes the analysis possible.  The format typcially reflects the design of the study, as will be demonstrated in the examples. 

In your text, the following data appear in section 6.????. Please read the text for a description of the study. Essentially, the table - below - includes the observed data and the expected data in parentheses.


Fault Guilty Not Guilty Total
Low 153(127.559) 24(49.441) 177
High 105(130.441) 76(50.559) 181
Total 258 100 358

In the hopes of minimizing the load time for remaining pages,  I will make use of the built in table facilty of HTML to simulate the Data Editor in SPSS. This will reduce the number of images/screen captures to be loaded.

For the Chi-Square statistic, the table of data can be coded by indexing the column and row of the observations.  For example, the count for being guilty with Low fault is 153.  This specific cell can be indexed as coming from row=1 and column=1.  Similarly, Not Guilty with High fault is coded  as row=2 and column=2.  For each observation, four in this instance, there is unique code for location on the table.  These can be entered as follows,

Row Column Count
1 1 153
1 2 24
2 1 105
2 2 76
  The above presents the data in an unambigous manner.  Once entered, the analysis is a matter of selecting the desired menu items, and perhaps selecting additional options for that statistic.  [Don't forget to use the labelling facilities, as mentioned earlier, to meaningfully identify the columns/variables.  The labels that are chosen will appear in the output window.]

To perform the analysis,

Although simple, the calculation of the Chi-square statistic is very particular about all the required steps being followed. More generally, as we enter hypothesis testing, the user should be very careful and should make use of manuals for the programme and textbooks for statistics.


By now, you should know that there are two forms of the t-test, one for dependent variables and one for independent variables, or observations. To inform SPSS, or any stats package for that matter, of the type of design it is necessary to have to different ways of laying out the data. For the dependent design, the two variables in question must be entered in two columns. For independent t-tests, the observations for the two groups must be uniquely coded with a Gruop variable. Like the calculation of the Chi-square statistic, these calculations will reinforce the practice of thinking about, and laying out the data in the correct format.

Dependent T-Test

To calculate this statistic, one must select [Statistics => Compare Means => Paired-Samples T Test...] after enterin the data. For this analysis, we'll use the data from Table 7.3, in Howell.

Quite simply, such calculations require very little effort!

Independent T-tests

When calculating an independent t-test, the only difference involves the way the data are formatted in the datasheet. The datasheet must include both the raw data and group coding, for each variable. For this example, the data from table 7.5 will be used. As an added bonus, the number of observations are unequal for this example.

Take a look at the following table to get a feel for how to code the data.


From the above you can see that we used the "Group" variable to code for the two variables. The value of 1 was used to code for "LBW-Experimental", while a value of 2 was used to code for "LBW-Control". If you're confused please study the table, above.

To generate the t-statistic,

The p-value of .004 is way lower than the cutoff of 0.025, and that suggests that the means are significantly different. Further, a Levene's Test is performed to ensure that the correct results are used. In this case the variances are equal, however, the calculations for unequal variances are also presented, among some other statistics - some not presented.

In the next section we will briefly demonstrate the calculation of correlations and regression, as discussed in Chapter 9 of Howell. In truth, you should be able to work through many statistics with your current knowledge base and the help files, including correlations and regressions. Most statistics can be calculated with a few clicks of the mouse.