Chi squared tests Flashcards
Definition of chi squared test
Tests for associations between 2 categorical discrete variables
What is a chi squared test
What distribution is it based on
What values can you get from this calculation
Tests for associations between 2 categorical variables that are discrete
Based on x2 distribution with n degrees
n degrees of freedom = (rows -1) x (columns -1)
p value given but no direct estimates or CU for estimates
What is the null hypothesis for the chi squared test
There is no association between the 2 variables in the population
What do we calculate in the X2 test
Calculates expected frequencies if null is true
Compares observed frequencies with expected values
If observed values are v different to expected => association
X2 distribution => p value
How do you interpret the p value
p < 0.05 => reject null
p ≥ 0.05 => can’t reject null
What are the 3 assumptions
80% of expected frequencies > 5
If nos are small => collapse table if there are multiple categories
Or use FIsher’s exact test
Sample size must be large
How do you calculate the p value
Degrees of freedom = (rows -1) x (columns - 1)
Use table for p values to find p value and compare to p=0.05
What are the 2 ways that you can summarize the size of an effect
Risk difference calculation
Relative risk calculation
How do you calculate the risk difference
p1 = exposed and diseased/total no exposed p2 = not exposed and diseases/total no not exposed
p1 - p2 = difference in proportion => 95% CI of risk difference
How do you calculate the relative risk
p1 = exposed and diseased/total no exposed p2 = unexposed and diseased/total no not exposed
p1/p2 = ratio of proportions => 95% CI of relative risk
How do you interpret the risk difference
Gives you the % difference between groups
How do you interpret the relative risk
Gives you the % difference of the event happening in each condition