Chi-square test of association in jamovi

Find out whether two categorical variables are related, using a contingency table, expected counts and an effect size.

  • Beginner
  • 3 min read
  • Updated

In jamoviAnalysesFrequenciesIndependent Samples

Short answer

Use Analyses → Frequencies → Independent Samples (the χ² test of association, under Contingency Tables). Put one categorical variable in Rows and the other in Columns. Under Statistics, keep χ² and tick Phi and Cramér’s V; under Cells, tick Expected counts and Row percentages. In the practice data, preferred format depends on year group: χ²(2, N = 140) = 15.96, p < .001, Cramér’s V = 0.338.

When to use it

The chi-square (χ²) test of association checks whether two categorical variables are independent — for example, whether first-year and final-year students prefer different learning formats. Each person must appear in only one cell of the table.

Related tests in the Frequencies menu:

  • N Outcomes (χ² goodness of fit) — does one categorical variable follow expected proportions?
  • 2 Outcomes (binomial test) — is a single proportion different from a test value?
  • Paired Samples (McNemar test) — the same people classified twice, such as before and after.

Before you start

course-feedback.csvSynthetic · 140 rows

140 simulated survey answers: year group and preferred learning format. Columns: student, year_group, preferred_format.

CSV

Check that year_group and preferred_format are both Nominal.

Step-by-step in jamovi

  1. Go to AnalysesFrequenciesIndependent Samples.
  2. Drag year_group into Rows and preferred_format into Columns. If your data are already summarised as counts (one row per cell), put the count variable in Counts (optional) instead.
  3. Open Statistics: keep χ², and tick Phi and Cramér’s V under Nominal. Tick Fisher’s exact test for small 2 × 2 tables.
  4. Open Cells: tick Expected counts under Counts and Row under Percentages.

Reading the output

The contingency table

Reference counts from course-feedback.csv. jamovi may list levels in a different order (for example alphabetically), which does not change the test.
Year group Video Reading Live session Total
First year (observed) 36 14 20 70
First year (expected) 25.0 21.5 23.5
Final year (observed) 14 29 27 70
Final year (expected) 25.0 21.5 23.5

Expected counts are what you would see if year group and format were unrelated. First-years chose Video far more often than expected (36 vs. 25.0); final-years leaned towards Reading.

The test and effect size

Statistic Value
χ² 15.96
df 2 — (rows − 1) × (columns − 1)
p < .001
Cramér’s V 0.338
N 140

The small p-value says the pattern is unlikely if the variables were independent. Cramér’s V (0 = no association, 1 = perfect) of 0.338 indicates a moderate association. Row percentages make the pattern easy to describe: just over half of first-years (36 of 70) preferred video, compared with a fifth of final-years (14 of 70).

Assumptions

  • Independence: each person contributes one observation.
  • Expected counts: the usual rule is that expected counts should be at least 5 in (nearly) every cell. All are well above 5 here. If they are not, combine sparse categories or, for 2 × 2 tables, use Fisher’s exact test.
  • Counts, not percentages: the test needs raw frequencies.

Reporting example (APA style)

A chi-square test of independence showed that preferred learning format was associated with year group, χ²(2, N = 140) = 15.96, p < .001, Cramér’s V = 0.338. First-year students preferred video more often than final-year students (51% vs. 20%), who more often preferred reading (41% vs. 20%).

Common mistakes

  • Running χ² on percentages or means. It only works on counts.
  • Repeated measures. The same people answering twice need McNemar’s test, not this one.
  • Ignoring tiny expected counts. The p-value becomes unreliable.
  • Reporting only “significant”. Describe how the groups differ with row or column percentages, and give Cramér’s V.

Troubleshooting

  • Variables will not go into Rows or Columns: they must be Nominal or Ordinal; continuous variables are not allowed.
  • Unexpected extra categories: inconsistent spelling (“video” vs. “Video”) creates separate levels. Fix the levels in the variable setup or the source file.
  • Warning about expected counts below 5: see the assumptions section above.

Sources and further reading

Enter full results · Esc close