Session 6 - Comparison of Categorical Variables within two groups? Flashcards
What is the null hypothesis for Person’s Chi-squared test?
The categorical variables are uncorrelated
What is the alternate hypothesis?
At least two of the categorical variables are correlated
What are some key assumptions of the Pearson’s chi-squared test?
Independent subjects
Un-ordered categories
For contingency tables:
-Assumes that the marginal totals are fixed
-Distribution of test statistic is approximately chi-squared
-Test statistic is the difference between observed and expected cell frequencies
What are the problems with chi-squared test?
Small cell counts: the chi-squared approximation breaks down with small numbers. How small?
Less than 5 in a cell (Fisher)
Less than 10 in a cell (Cochran)
n less than 40 - total across all cells (Cochran)
-Fixed margin total
Is the Yates correction universally accepted?
Why is it done?
What’s the message to do it with a chi-square test?
No it isn’t
It is done as correction for low (expected, not observed) cell counts.
Page 31 - session 6 lecture
R will do it by default with any column sample less than 5
To preven this, correct=FALSE
What do we do when we are considering “as or more extreme”?
Fisher’s exact or Fisher-Irwin test
What test do we use if a priori we expect there to be agreement between the binary outcomes?
Give an example
McNemar’s test
For example, comparing the outcomes of two supposedly inter-changeable tests
What tests whether the proportion follows a trend?
Chi-square test for trend