Chi Square Test
HYPOTHESIS TESTING Chi Square Test In the last exercise, we looked at data where customers visited a website and either made a purchase or did not make a purchase. What if we also wanted to understand if the probability of making a purchase depends on some other categorical variable, like gender? If we want to understand whether the outcomes of two categorical variables are associated , we should use a Chi Square test. It is useful in situations like: An A/B test where half of users were shown a green submit button and the other half were shown a purple submit button. Was one group more likely to click the submit button? People under and over age 40 were given a survey asking “Which of the following three products is your favorite?” Did these age groups have significantly different preferences? In SciPy, you can use the function chi2_contingency to perform a Chi Square test. The input to chi2_contingency is a contingency table where: The columns are ...