Inference for categorical data (chi-square tests)

Chi-square tests are a family of significance tests that give us ways to test hypotheses about distributions of categorical data. This topic covers goodness-of-fit tests to see if sample data fits a hypothesized distribution, and tests for independence between two categorical variables.

A chi-square goodness-of-fit test examines how well a sample of categorical data fits a hypothesized distribution. For example, take a sample of people and ask them what day of the week they were born. You probably won't get the same number of people born on each day, but does that offer strong evidence that the distribution isn't even for everyone?