Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Chi-Square

Test of
Independence
Hypothesis Testing so far in class:
We’ve been comparing means either through
the z-score or t-values which is based on
interval/ratio data.

But what to do if our variables are Nominal or


Ordinal—remember these terms?
Categorical Data: Simple Categories
Examples:
• Yes, No or Undecided
• Strongly Agree, Agree, Disagree, Strongly Disagree
• Conservative, Liberal, NDP
• Public, Private

How do we test an hypothesis, or for correlation, now?


Shift our language a bit:
We have learned:
Null Hypothesis. Hₒ= 0, no difference between means.

Now use different language:


Null Hypothesis. Hₒ based on relationship
How test Null Hypothesis? Use
the Chi-Square Test of Independence
The Chi-Square Test of Independence is the
hypothesis testing procedure appropriate for
categorical values. It allows us to determine if
two variables are associated in some way.
Examples:
• Is political affiliation associated with attitude toward a certain issue?
• Is gender associated with selection of an academic major?
• Is the place of residence associated with attitudes toward certain issues?
What is the Chi-Square Test of
Independence?
• A hypothesis-testing procedure appropriate
for qualitative variables.
• It tests whether or not there is an association
between two variables.

– Ie. Is gender associated with selection of a major?


– Is city of residence associated with attitudes on
taxes?
1. What are the variables?
2. Are the variables associated in some way?
Below are two extreme examples shown in contingency
tables.
• Are the variables associated in some way, or
are they independent of one another?

• Association = element of predictability—but


not why one variables is tied to another.
• Association is NOT causation.
When two variables are associated:
They exhibit a pattern that is a
departure from chance.
Following Example: Does an association exist
between student level and position on issue of
firing teachers? n=98, α=0.05

Null Hypothesis: Hₒ= There is no association


between these two variables.
Must compare Observed Frequencies (fₒ) & Expected Frequencies (fₑ).

Expected Frequencies (fₑ) of each cell: (Row Total x Column Total) ÷ 𝑛


Now you can compare fₒ and fₑ
We now have all the elements for the Chi-Square Test.

• x2 = Σ (8-10.78)2/10.78 + (17-10.45)2/10.45 + ….
• x2 =Σ 7.73/10.78 + 42.90/10.45 + …
• x2 = Σ 0.72 + 4.11 + 1.33 + 1.45 + 0.23 + 2.80 +
3.43 + 2.14 + .17
• x2 =16.38. This is our calculated test statistic.
What next? What do we do with the
test statistic of 16.38?
Need to compare it with a critical value given a
certain level of significance and taking into
account a certain degree of freedom.

Use a Table of Critical Values for the Chi-Square


Test of Independence.
Degrees of Freedom
Formula: df= multiply the number of rows
minus 1 by number of columns minus 1.
df = (r-1) x (c-1)
– df = (3-1) x (c-1)
– df = 2 x 2
– df = 4
α=level of significance=0.05
• critical value = 9.46
Our critical test statistic = 16.38
16.38 exceeds the critical value of 9.46.

Null Hypothesis: Hₒ= There is no association


between these two variables.
We reject the Null Hypothesis. We reject the
idea of no association between the two
variables, with a 5% chance that we may be
wrong.

You might also like