Skip to content
Grad Coach

Diagram · CC BY 4.0

Contingency table example: a 2 × 2 with marginal totals

Handedness by sex for 100 people, with marginal totals, row percentages and an odds ratio.

A 2 × 2 contingency table of sex (male or female) against handedness (right-handed or left-handed) for 100 individuals. The counts are 43 right-handed males, 9 left-handed males, 44 right-handed females and 4 left-handed females. The marginal totals are 52 males, 48 females, 87 right-handed and 13 left-handed, and the grand total is 100. Each cell also shows its percentage of the row total: 82.7% of males and 91.7% of females are right-handed, 17.3% of males and 8.3% of females are left-handed, and 87.0% and 13.0% of all 100 are right-handed and left-handed.

Swipe sideways to see the whole diagram, or download the PNG.

Contingency table 2x2 example. Derek Jansen, Grad Coach, CC BY 4.0.

What it shows

A 2 × 2 contingency table of sex against handedness for 100 individuals, a standard textbook example.

The marginal totals are tinted and the grand total more strongly, each cell carries its row percentage, and a panel underneath works out the odds ratio and its 95% confidence interval.

How to read it

  1. The four inner cells are counts: 43 right-handed and 9 left-handed males, 44 right-handed and 4 left-handed females.

  2. The marginal totals add across and down: 52 males and 48 females, 87 right-handed and 13 left-handed, 100 in all.

  3. Row percentages compare the groups fairly when they differ in size: 82.7% of males and 91.7% of females are right-handed.

  4. The proportions are about the same. The odds ratio is 2.30, but its 95% confidence interval, 0.66 to 8.04, includes 1, so this sample gives no clear evidence of a difference; judging one needs a test or an interval, not the ratio alone.

The numbers

  • Male: 43 right-handed (82.7%), 9 left-handed (17.3%), total 52.
  • Female: 44 right-handed (91.7%), 4 left-handed (8.3%), total 48.
  • Total: 87 right-handed (87.0%), 13 left-handed (13.0%), grand total 100.
  • Odds ratio (left-handed, males vs females): (9 / 43) / (4 / 44) = (9 × 44) / (43 × 4) = 396 / 172 = 2.30, with a 95% confidence interval of 0.66 to 8.04 (Woolf’s method).

Ways to use it in teaching

  • Hide the totals and have students fill them in, then compute the row percentages.

  • Ask whether 82.7% against 91.7% is a meaningful difference with only 13 left-handed people in the sample; it leads into a chi-squared or Fisher’s exact test.

  • Recompute the odds ratio for being right-handed and show that it is the reciprocal, 0.43.

For the chi-square test of a table like this, and what its result does and does not show, see our guide to inferential statistics.

Sources

  • Contingency table. (n.d.). In Wikipedia. Retrieved October 19, 2026, from https://en.wikipedia.org/wiki/Contingency_table
  • StataCorp. (2013). Stata survival analysis and epidemiological tables reference manual: Release 13. Stata Press. https://www.stata.com/manuals13/stepitab.pdf

The 95% confidence interval for the odds ratio uses Woolf’s method (Woolf, 1955, as cited in StataCorp, 2013), computed by us.

Describing data

Related diagrams

All open educational resources

Need something else?

Tell us which diagram, template or worked examples would help your teaching, and we’ll do our best to add it to the collection.