pronounced “kigh square”
Used when measuring a nominal variable. We deal with the frequency of individuals in a caregory (like “republicans” or “answered yes”). It allows us to answer questions like “40% of people said yes.. but does this reflect what we’d expect from the underlying population?”
There is no limit on the number of categories we can test. When we have one variable, we use the one-way chi square procedure and two variables means two-way.
When reported in a paper, it looks like which says “df=1, N=50 we found it significant with a of 18.00.
Definitions
observed frequency : . The frequency that participants fall into a given category
expected frequency : . Frequency we expected in a category if the sample data perfectly represented the distribution of the population described by (no difference) aka .
one-way chi square procedure
There are 5 assumptions of this test.
- Participants are categorized along one variable having 2+ categories and we can count the frequency in those categories.
- Each participant can only be in one category.
- Category membership is indepenent (the fact that someone is in one category does not influence the probability that another participant will be in any category)
- We include the responses of all participants in the study
- The “expected frequencies” must be at least 5 per category.
There’s no standard way to state the null hypothesis, so we say:
and
Formulas:
Unlike ANOVA, there is no post-hoc testing nor effect size to calculate. Merely documentation of what the observed frequency is.
example
We’re testing whether geniuses are more often left-handed than the population.
In the population, we know that left-handedness happens 10% of the time.
Looking at geniuses, we see a 20% rate.
left handed | right handed |
---|---|
f_o = 10 | f_o = 40 |
f_e = 5 | f_e = 45 |
Because and , so this is a significant difference.
two-way chi square procedure
Tests whether or not a variable is independent of (e.g. unrelated to) another category. This is like interaction testing in two-way ANOVA.
Used when there are two variables like this. Note that it doesn’t have to be a 2x2 design, but could be 4x7. As long as there are only two factors.
type A personality | type B | |
---|---|---|
heart attack | ||
no heart attack |
A dataset of complete independence would be:
type A personality | type B | |
---|---|---|
heart attack | 20 | 20 |
no heart attack | 20 | 20 |
Total dependence would be:
type A personality | type B | |
---|---|---|
heart attack | 40 | 0 |
no heart attack | 0 | 40 |
: Category membership is indepentend of category membership in the other. : The category membership is dependent.
In this setup, we can find the expected frequency via:
example
type A personality | type B | |
---|---|---|
heart attack | 25 | 10 |
no heart attack | 5 | 40 |
- Calculate for each cell:
type A personality | type B | |
---|---|---|
heart attack | (30*35)/80 = 13.125 | (50*35)/80 = 21.875 |
no heart attack | (45*30)/80 = 16.875 | (50*45)/80 = 28.125 |
- Calculate .
so this result is significant and we can reject
Post-hoc testing
We can post-hoc test two-way chi square.
phi coefficient
. A post-hoc test for 2x2 chi-square to deteremine how independent it is. 0 is complete independence. 1 is total dependence. Real research tends to be in the .2 - .5 range.
Given the example above, , so this is a pretty strong effect.
Squaring a correlation coefficient gives us the “proporiton of variance accounted for” (a la Effect size), so says 38% of the differences is associated with their personality type.
contingency coefficeint
. This is like the phi-coefficient for things that aren’t 2x2 (e.g. 2x3 or 3x3 etc).