# Chi Square Test of Association

Document Sample

```					Survey of Statistical Methods

We will be meeting in the
Computer Lab today

April 27, 2005
Chi Square Test of Independence
• Purpose
– To determine if two variables of interest independent (not related) or are
related (dependent)?
– When the variables are independent, we are saying that knowledge of one
gives us no information about the other variable. When they are dependent,
we are saying that knowledge of one variable is helpful in predicting the
value of the other variable.
– The chi-square test of independence is a test of the influence or impact that a
subject’s value on one variable has on the same subject’s value for a second
variable.
– Some examples where one might use the chi-squared test of independence
are:
• Is level of education related to level of income?
• Is the level of price related to the level of quality in production?
• Is one party affiliation related to the person's preferred television network?

• Hypotheses
– The null hypothesis is that the two variables are independent. This will be
true if the observed counts in the sample are similar to the expected counts.
• H0: X and Y are independent
• H1: X and Y are dependent
Chi Square Test of Independence

• Wording of Research questions
– Are X and Y independent?
– Are X and Y related?
– The research hypothesis states that the two
variables are dependent or related. This will be
true if the observed counts for the categories of
the variables in the sample are different from
the expected counts.

• Level of Measurement
– Both X and Y are categorical
Assumptions
Chi Square Test of Independence
• Each subject contributes data to only one cell

• Finite values
– Observations must be grouped in categories. No assumption is made about
level of data. Nominal, ordinal, or interval data may be used with chi-
square tests.

• A sufficiently large sample size
– In general N > 20.
– No one accepted cutoff – the general rules are
• No cells with observed frequency = 0
• No cells with the expected frequency < 5
• Applying chi-square to small samples exposes the researcher to an
unacceptable rate of Type II errors.
Note: chi-square must be calculated on actual count data, not substituting
percentages, which would have the effect of pretending the sample size is
100.
Post Hoc Strategy
for the Chi Square Test of Independence

• If there is at least one cell with a significant
standardized residual
– Formulate your conclusion based on a comparison of all of
the cells containing significant standardized residuals.

• If none of the cells have a significant standardized
residual
– Interpret the findings based on a comparison of the ‘sign (+
or -)’ of the largest values for the standardized residuals.
– Apply caution when this is the case!
Chi Square Test of Goodness of Fit
• Purpose
– To determine whether an observed frequency
distribution departs significantly from a
hypothesized frequency distribution.
– This test is sometimes called a One-sample Chi
Square Test

• Hypotheses
– The null hypothesis is that the two variables are
independent. This will be true if the observed counts
in the sample are similar to the expected counts.
• H0: X follows the hypothesized distribution
• H1: X deviates from the hypothesized distribution
Chi Square Test of Goodness of Fit
• Sample Research Questions
– Do students buy more Coke, Gatoraide or
Coffee at the CHS coffee cart?
– Does my sample contain a disproportionate
amount of Hispanics as compared to the
population of the county from which they were
sampled?
– Has the ethnic composition of the city of Ithaca
changed since 1990?

• Level of Measurement
– X is categorical
Assumptions
Chi Square Test of Goodness of Fit
• The research question involves the comparison of
the observed frequency of one categorical variable
within a sample to the expected frequency of that
variable.

• The observed and theoretical distributions must
contain the same divisions (i.e. ‘levels’ or ‘classes’)

• The expected frequency in each division must be >5

• There must be a sufficient sample (in general N>20)
SPSS Analysis
Chi Square Test of Goodness of Fit

• Analyze –               X variable
goes here
Nonparametric Tests –
Chi Square                             If all expected
frequencies are
the same, click
this box

If all expected
frequencies are
not the same, enter
the expected value
for each division
here
Examples
(using the Montana.sav data)

All                              All
expected frequencies              expected frequencies
are the same                    are not the same
Sample Problem

• A researcher in Montana wanted to
determine if people in Montana perceived
themselves to be financially better, worse
or the same as they were last year. A
random sample of 400 residents were sent
a questionnaire at the end of April in
1999. A total of 209 complete surveys
were returned to the researcher.
Research Questions
1. Did an equal number of men and women reply to
the questionnaire?
2. Were the respondents equally distributed across the
state?
3. Do Montana residents perceive themselves to be
financially better, worse, or the same as last year?
4. Are the perceptions the same for men and women?
5. Are the perceptions different depending on where
you live?
6. Are the perceptions the same across income levels?
7. Are the perceptions the same for individuals who
make under \$20K vs. those that make over \$35K?
(due at the end of class today)

• You can work by yourself or with one other
person (if you work with someone, you must sit
next to each other)
• I will answer any questions you might have,
however, if you ask a question that I have
provided in class
• Print out and attach the graph you have
created
• You need to hand in the assignment to me
before you leave
Are there more Chi Square Tests?
– X2 Test for Independence
– X2 Test for Goodness of Fit

• YES! Here are a few…
–   X2 Test for a Population Variance
–   X2 Test for an Assumed Population Variance
–   X2 Test for Compatibility of K Counts
–   X2 Test for Consistency in a 2 X 2 Table
–   X2 Test for Consistency in a K X 2 Table
–   X2 Test for Consistency in a 2 X K Table
–   X2 Test for a Suitable Probabilistic Model

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 4 posted: 8/28/2012 language: English pages: 15