Professional Documents
Culture Documents
Chi Squared Test
Chi Squared Test
Chi Squared Test
Chi 2
= (O - E)
E
Where:
O = observed frequency - the data observed in our
research/survey
E = expected frequency, and
= the summation over all the cells in the table
FORMAT OF CELL
• Each cell follows the pattern:
Observed Expected
O–E (O - E)2
EXAMPLE OF GOODNESS OF
FIT
observed 200 sick leave absences - the expected frequency in each cell
must be 200/5 = 40
Choice of
drink Significant as p<.05
Chi-
8.400
Square(a)
df 3
Asymp. Sig. .038
a 0 cells (.0%) have expected frequencies less than 5. The minimum expected cell frequency is 10.0.
How to Interpret Output
• The observed choice frequencies are presented in the
second column.
• The expected frequencies of cases are displayed in the
third column. The expected frequency for each of the
four drinks with 40 personal choices is 40/4, i.e. 10.
• The residual column displays the differences between
the observed and expected frequencies.
• The second box presents the value of chi square, its
degrees of freedom and its significance. Chi square is
8.4, its degrees of freedom are 3 (i.e. 4 choices - 1) and
its significance level is 0.038. This indicates that there is
a statistically significant deviation from the expected
distribution of equality beyond p<.05. Coke is most
popular while Solo and Sprite are significantly less
preferred.
• Note the comment below the second sub-table. Chi
square requires expected cell frequencies of at least 5.
CROSS-TABULATION
This is a two-dimensional table showing
frequencies in each combination of
categories for two nominal variables -
each of which can be divided into two or
more sub-categories,e.g.
– preference for type of music (classical, jazz,
country and western, rock) against age
group (below 21; 21 - 45; above 45)
– length of service in year groupings against
job position level
CONTINGENCY AND CROSS-
TABULATION TABLES
• SPSS calculates the expected frequency values for each of the cells
in the contingency table. Chi square in this example is 38.05, which
far exceeds the 0.01 level, indicating a significant association
between number of children and number of computers.
Two 20 16 8
One 40 22 10
None 12 36 42
SPSS EXAMPLE OF
CONTINGENCY
• In this example, we will examine the Null
Hypothesis that there is no significant
relationship between gender and whether the
person smokes or not.
• The Alternate Hypothesis is that there is a
significant relationship between gender and
whether the person smokes or not.
• The analysis compares the observed
frequencies (actual data) to the expected
frequencies (those that could be expected if there
were no significant relationship between the two
variables, i.e. frequencies possible under Ho
SPSS EXAMPLE OF
CONTINGENCY
1. Select Analyze to produce the drop-down menu
of the various statistical processes.
2. Choose Descriptive Statistics to obtain a
second drop-down menu
3. Select Crosstabs. This opens the Crosstabs :
dialogue box.
4. Click on ‘gender' and then the arrow button
beside Row[s]: which transfers it into
the Rows box.
5. Select 'smoke or not' and then the arrow button
beside Column[s] which moves it to the
Columns box. It does not matter which variable
goes in row or columns.
SPSS EXAMPLE
SPSS EXAMPLE
6. Choose Statistics at the bottom of the Crosstabs :
dialogue box. This opens the Crosstabs: Statistics dialogue box.
7. Select Chi square, then phi and Cramer’s V in the
Nominal data box.
SPSS EXAMPLE
• 8. Next click on Continue
• 9. Select Cells This produces the
Crosstabs: Cell Display dialogue box.
• 10. Choose Expected in the Counts box.
(Observed should already be selected).
• 11. Click on Row, Column and Total in
the Percentages box.
• Select Continue. Finally select OK.
SPSS EXAMPLE
SPSS EXAMPLE
gender * smoke or not Cross-tabulation
smoke or not
Does not
smoke Smokes Total
gender male Count 10 12 22
Expected Count 11.6 10.5 22.0
% within gender 45.5% 54.5% 100.0%
% within smoke or not 47.6% 63.2% 55.0%
% of Total 25.0% 30.0% 55.0%
female Count 11 7 18
Expected Count 9.5 8.6 18.0
% within gender 61.1% 38.9% 100.0%
% within smoke or not 52.4% 36.8% 45.0%
% of Total 27.5% 17.5% 45.0%
Total Count 21 19 40
Expected Count 21.0 19.0 40.0
% within gender 52.5% 47.5% 100.0%
% within smoke or not 100.0% 100.0% 100.0%
% of Total 52.5% 47.5% 100.0%
SPSS EXAMPLE
• The printout shows the observed and expected
frequency of cases in each cell. The observed
frequency (called Count) is presented first and
the expected frequency (Expected count)
underneath.
• The observed frequencies are always whole
numbers. Expected frequencies are always
expressed to one decimal place. Thus the first
cell of the table (defined as ‘male’ and ‘does not
smoke’) has an observed frequency of 10 but an
expected frequency of 11.6. The rest of the table
is also easily interpretable.
SPSS EXAMPLE