The Chi-square Test of Independence.
The Chi-square Test of Independence.
The chi-square test of independence is used to
test whether two populations or variables are related or independent to
each other with
1. Know when to use the chi-square test for independence.
The chi-square test of independence is used to test when two
categories (each with many cells or groups) are related or not related
Sometimes individual items are classified into categories in terms of
two different criteria. For example, in studying the wear of tires, tires
The table above where categorical cells are combined to show their rows and column totals is called a contingency table.
Example 2 (from Textbook). For two categries: (1)
Political candidates, A and B and (2) Voter Types, Male or Female a reporter
2. Know how to setup a Contingency
Tables for the chi-square tests when studing
independence (or homegeneity ) of
A contingency table organizes the results of a study involving
two categoriies (with many classifications within each category) by
A contingency table (Observed
frequencies) is constructed as followed:
3. Know how to compute the expected freguencies for chi-square test of independent charateristics.
Each cell in the contingency table have some theoretical or expected
frequency and unless otherwise known (explicitly) it is determined
The expected frequency, E for each cell is determined by taking
the product of the corresponding row and column totals divided by the
4. Know the relationship between the observed and expected frequencies and the chi-square test of independence.
The chi-sqaure test for independence evaluates the closeness of the
observed frequencies (O) fij
to the expected frequencies (E), Eij,
Remember the chi-square statistics is
5. Know the multiplication rule for independence characteristics and its role in chi-square analysis.
The cell frequencies found in the contingency table when divided by
the grand total yield the proportions, p of observations
or results out
If p(m) is the proportion of rowm
(frequency of rowm divided by the grand total
and p(k) is the column proportion of columnk
The multiplication rule for independent characteristics is p(m and k) = p(m) x p(k).
Where p(m and k) or
is the probability or frequency of both m and k occuring
(assumes that both m and k are indepedent events
Example (Observed Proportion - from table below)
( Expected Proportion - from table below)
The chi-square test of independence attempts to compare the expected
proportions using the multiplication rule of independent characteristics
If the multiplication rule does not hold for each cell, the two charateristics are not independent, they are related.
That is, the sum of square of the Observed frequencies minus the expected is small.
I is small.
6. Know how to compute and evaluate the chi-square test of independence statistics.
Problem: A researcher wants to
study how 7 methods of preparations affects students getting over 80% on
a aptitude test. The researcher
The following table is the observed results of the study: contingency table.
Use chi-square test for independent charateristics to evaluate this
Procedure for calculating chi-square test of independence:
Step 1. Make a problems statement: (becomes the hypothesis statement, Ho ).
(1) Are the Methods of preperation and number of months after preperation related in terms of students achievement scores (> 80% on test)?
(2) Are the two criteria (methods of Preperation and number of months
test is taken after preperation) independent or related to with respect
Note: that the formulation of a problems statement or the question that
the research would like to answer statistically may take on many forms
So Ho (null hypothesis): Methods of Prep and Months after Prep are independent. (not related or interacts with respect to students scores).
Ha: Ho is not true. (alternate hypothesis): Methods of Prep and Months after Prep are related.
Step 2. Choose , the significance level of the test.
If you want the be 95 % certain that the test is true, then = 0.05 =(100-95)/100
The df = (r-1)(c-1), or (m-1)(k-1) = (3-1)(7-1)=12
So df = 12
Step 3. Look up
For d.f. = 12,
Step 4. (4) Determine or compute , The Expected Frequencies:
The following table is the Expected Frequencies, E of each cells
in the study:
Step 5. Compute
Table of Expected Values (click for larger image)
(click for larger image)
= 45.5974 from computational table above.
Step 6 Perform test chi-square test: ,
i.e. 45.60 > 21.03, Then we assume
that the Null Hypothesis is not true (the types of preparations and number
Make Conclusion or inference:
There seems to be some relationship between types of students' preparation and number of weeks after preparation that tests are taken.
So Ha (alternate hypothesis) is favored by this test.
Formulate an hypothesis about the relationship between Political view
and Opinion of Nuclear Power from the following survey of 100 students.
(a) What is your hypothesis?
(b) What is the value of the chi-square statistics?
(c) What conclusion did you make?
(d) What inference can you make?
Use use contingency table to help