FAQ/ChiSquaredSpss - CBU statistics Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
Type the odd letters out: scieNce GATHeRS knowledge fAster tHAN SOCIeTY GATHErS wisdom

location: FAQ / ChiSquaredSpss

How to do a two way Chi-squared analysis from inputting aggregated frequency counts directly into SPSS

Here is a fictitious dataset describing the incidence of a certain type of brain-damage within a population subdivided by age.

Brain-damaged

Normal

Young

23

12

Old

13

11

Input the row and column categories and counts.

Enter these into an SPSS DATA sheet with variables (columns) named:

  • damaged (coded Brain-damaged = 1 or Normal = 2),

  • agegroup (coded Young = 1 or Old = 2), and

  • count.

damaged

agegroup

count

1

1

23

2

1

12

1

2

13

2

2

11

Now 'weight' the data.Click on DATA on menu then click on WEIGHT CASES, click on WEIGHT CASES BY and then put the counts column into the frequency variable box.

Click on OK.

Now analyze the data.Click on ANALYZE:DESCRIPTIVE STATISTICS:CROSSTABS.

Place one categorical variable in the row window and the other in the column window using the arrow buttons (order not important).

Click on STATISTICS then on CHI-SQUARE then click CONTINUE.

Click on OK.

The output should now contain the results of a chi-square analysis.

Chi-square(1)=0.80, (two-sided) p=0.37 so conclude no relationship between age and amount of brain damage.

Here is the syntax corresponding to the above:

WEIGHT BY count .
CROSSTABS
/TABLES=damaged BY agegroup
/FORMAT= AVALUE TABLES
/STATISTIC=CHISQ
/CELLS= COUNT .

* An example where the table rows have identical totals

[Last updated 21 January, 2011]


Return to Statistics FAQ page

Return to Statistics main page

Return to CBU main page

These pages are maintained by Ian Nimmo-Smith and Peter Watson