Chi-square Flashcards
basic idea of chi square
compares observed count to expected count
measure of error =
(observed - expected)^2/expected
contingency table analysis
when 2+ categorical variables and interested to see if there is some kind of association between those variables
chi-square test for independence
often research interest in two or more categorical variables each having two or more categories
if no relation between variables, they’re called independent
for chi square test of independence need to create
contingency table
null and alternative for chi square test of association
H0: two (categorical) variables are independent
Ha: two (categorical) variables are associated
assumptions of chi-square tests
- Both variables are categorical.
- Observations are randomly sampled from the population(s).
- Observations are independent
- Each observation is in exactly one category per variable. (no overlapping categories)
- Sample sizes are large, with E(Fe) at least 5 for every cell
contingency table does what
contrasts observed frequencies in each cell of a contingency table with expected frequencies
Fisher’s exact test
• Useful where chi-square test is inappropriate because E(Fe)