To determine whether the observed frequencies of a categorical variable match the expected frequencies based on a hypothesized distribution. It helps to assess if a sample comes from a population with a specific distribution. In other words, it helps to determine if the observed (O) distribution of the variable differs from the expected (E) distribution.
Goodness of Fit: One categorical variable with 2+ levels (testing whether observed frequencies match expected)
Test of Independence: Two categorical variables (testing whether they are related to each other)
Do NOT use chi-square if: Your variables are continuous → use correlation or regression, you want to compare means between groups → use t-test or ANOVA, expected cell frequencies are below 5 in more than 20% of cells → use Fisher's Exact Test.
Before running a test, three assumptions should be met:
Categorical data: Both variables must be categorical (nominal or ordinal). Chi-square cannot be used with continuous variables.
Independence of observations: Each participant contributes to only one cell in the frequency table.
Expected cell frequency: Expected frequencies in each cell should be at least 5. If this is violated, use Fisher's Exact Test (available in Jamovi under the same menu).
Goodness of Fit
Click "Frequencies"
Click "N Outcomes"
Add the nominal variable of interest to the "Variable" slot
Check "Expected counts"
Test of Independence
Click "Frequencies"
Click "Independent Samples"
Add two variables to "Rows" and "Columns"
Click "Statistics" and select "Phi and Cramer's V"
Click "Cells" and select "Expected"
p-value: The probability of detecting a meaningful relationship/difference when there is none. We are typically looking for a small value (p < .05).
If p < .05, reject the null hypothesis. There IS a difference.
If p > .05, accept the null hypothesis. There is NO difference.
df: Values in a study that have the freedom to vary and are essential for assessing the importance and validity of the null hypothesis.
Chi-Square Statistic (Χ²): The discrepancy between the observed and expected frequencies.
If the Χ² is higher, there is a greater discrepancy.
Cramér's V: Effect size, the strength of the association between the two categorical variables.
V ≈ .10 = small effect
V ≈ .30 = medium effect
V ≈ .50 = large effect
Appropriate data visualization: Bar graphs or pie charts
Sample write-up:
Goodness of fit: A chi-square goodness of fit test examined whether attachment style was equally distributed across the sample. Observed frequencies were: secure (n = 48), anxious (n = 27), and avoidant (n = 25). The expected frequency for each category was 33.33. The results were statistically significant, χ²(2, N = 100) = 8.06, p = .018, indicating that attachment styles were not equally distributed in this sample.
Test of independence: A chi-square test of independence examined whether biological sex was associated with diagnosed anxiety disorder status. The association was statistically significant, χ²(1, N = 200) = 6.43, p = .011, Cramér's V = .18. These results suggest a small but significant association between sex and anxiety diagnosis in this sample.