Chi Square
Chi Square
Chi-Square
4
1. Determine Appropriate Test
α is a predetermined value
The convention
• α = .05
• α = .01
• α = .001
6
3. Determine The Hypothesis:
Whether There is an Association
or Not
Ho : The two variables are independent
Ha : The two variables are associated
7
4. Calculating Test Statistics
Contrasts observed frequencies in each cell of a
contingency table with expected frequencies.
The expected frequencies represent the number of
cases that would be found in each cell if the null
hypothesis were true ( i.e. the nominal variables
are unrelated).
Expected frequency of two unrelated events is
product of the row and column frequency divided
by number of cases.
F e = Fr F c / N
8
4. Calculating Test Statistics
( Fo Fe ) 2
2
Fe
9
4. Calculating Test Statistics
O
fre bse
qu r ve
en d
c ie
s
( Fo Fe ) 2
2
Fe
Ex que
fre
pe ncy
c te
d
qu ed
cy
fre pect
en
Ex
10
11
5. Determine Degrees of
f
be r o
Num column
df = (R-1)(C-1)
ls i n
l e ve a r i a bl e
Freedom
v
N u m b er of
l e v e l s i n ro
va r i a b w
le
6. Compare computed test statistic
against a tabled/critical value
The computed value of the Pearson chi- square
statistic is compared with the critical value to
determine if the computed value is improbable
The critical tabled values are based on sampling
distributions of the Pearson chi-square statistic
If calculated 2 is greater than 2 table value,
reject Ho
12
Example
13
Bivariate Frequency Table or
Contingency Table
Favor Neutral Oppose f row
Democrat 10 10 30 50
Republican 15 15 10 40
f column 25 25 40 n = 90
14
Bivariate Frequency Table or
Contingency Table
Favor Neutral Oppose f row
Democrat 10 10 30 50
Republican 15 15 10 40
f column d 25 25 40 n = 90
r ve ies
b se nc
O que
fre
15
Row frequency
Bivariate Frequency Table or
Contingency Table
Favor Neutral Oppose f row
Democrat 10 10 30 50
Republican 15 15 10 40
f column 25 25 40 n = 90
16
Bivariate Frequency Table or
Contingency Table
Favor Neutral Oppose f row
Democrat 10 10 30 50
Republican 15 15 10 40
f column 25 25 40 n = 90
Column frequency
17
1. Determine Appropriate Test
18
19
Alpha of .05
3. Determine The Hypothesis
20
4. Calculating Test Statistics
21
4. Calculating Test Statistics
22
4. Calculating Test Statistics
23
4. Calculating Test Statistics
= 11.03
24
25
5. Determine Degrees of
Freedom
df = (R-1)(C-1) =
(2-1)(3-1) = 2
6. Compare computed test statistic
against a tabled/critical value
α = 0.05
df = 2
Critical tabled value = 5.991
Test statistic, 11.03, exceeds critical value
Null hypothesis is rejected
Democrats & Republicans differ
significantly in their opinions on gun
control issues
26
SPSS Output for Gun Control
Example
Chi-Square Tests
Asymp. Sig.
Value df (2-sided)
Pearson Chi-Square 11.025a 2 .004
Likelihood Ratio 11.365 2 .003
Linear-by-Linear
8.722 1 .003
Association
N of Valid Cases 90
a. 0 cells (.0%) have expected count less than 5. The
minimum expected count is 11.11.
27
Additional Information in SPSS
Output
Exceptions that might distort χ2
Assumptions
– Associations in some but not all categories
– Low expected frequency per cell
Extent of association is not same as
statistical significance
Demonstrated
through an example
28
Another Example Heparin Lock
Placement
Complication Incidence * Heparin Lock Placement Time Group Crosstabulation
31
Pearson Chi-Square
Pearson Chi-Square
= .250, p = .617
Since the p > .05, we fail to
reject the null hypothesis
that the complication rate
is unrelated to heparin
lock placement time.
Continuity correction is
used in situations in which
the expected frequency for
any cell in a 2 by 2 table is
less than 10.
32
More SPSS Output
Symmetric Measures
Asymp.
a b
Value Std. Error Approx. T Approx. Sig.
Nominal by Phi -.050 .617
Nominal Cramer's V .050 .617
Interval by Interval Pearson's R -.050 .100 -.496 .621c
Ordinal by Ordinal Spearman Correlation -.050 .100 -.496 .621c
N of Valid Cases 100
a. Not assuming the null hypothesis.
b. Using the asymptotic standard error assuming the null hypothesis.
c. Based on normal approximation.
33
Phi Coefficient
Pearson Chi-Square
Symmetric Measures
Value
Asymp.
by 2, a different index must be Nominal by Phi
Value
-.050
Std. Error
35
Cramer’s V
When the table is larger than 2 Symmetric Measures
Asymp.
by 2, a different index must be Nominal by Phi
Value
-.050
Std. Error