100 likes | 226 Views
Hypothesis Testing with Categorical Variables. 5th - 9th December 2011, Rome. A hypothesis. Is the prevalence within each food consumption group significantly different between male-headed and female-headed households? Both variables are categorical… How can we test this hypothesis?.
E N D
Hypothesis Testing with Categorical Variables 5th - 9th December 2011, Rome
A hypothesis • Is the prevalence within each food consumption group significantly different between male-headed and female-headed households? • Both variables are categorical… • How can we test this hypothesis?
Pearson’s chi-square test • Pearson’s chi-square test is used to evaluate if the observed values in the rows and columns of a table differ from the expected values
Limitations • While Pearson’s chi-square test will tell you if there is a significant difference, it cannot test the strength or direction of the difference • For this reason, we often recode one of the categorical variables into a continuous variable and use a different test
Recoding • To use an ANOVA or a t-test, we need one of the variables to be continuous • This is simply done by recoding a dichotomous variable to a value of 0 or 1
Returning to our example… • Is the prevalence within each food consumption group significantly different between male-headed and female-headed households? • Food consumption groups have a value of: • Poor food consumption • Borderline food consumption • Acceptable food consumption • Sex of household have a value of: • Males • Females Recode each food consumption group into a bivariate: 0 = no; 1 = yes Run an ANOVA to test the hypothesis
ANOVA output for poor food consumption and sex of household head What can we say about our hypothesis?
ANOVA output for borderline food consumption and sex of household head What can we say about our hypothesis?
ANOVA output for acceptable food consumption and sex of household head What can we say about our hypothesis?
Your turn • Propose a hypothesis to test that uses data from 2 categorical variables • State your hypothesis • How will you recode the variable to answer your hypothesis?