# Expected counts

In a two-way table, the expected count for a cell is (row total x column total) / grand total. It is what you would see if the two variables were unrelated.

Statistics (university) · Part 07: Comparing categories and many groups · Card 2 of 8 · Last updated 2026-10-19

## Analogy

If 50 percent of everyone is in group A and 50 percent say yes, then half of half, or 25 percent, should be both.

## Example

**Building the table**

Group A: yes 30, no 20 (row 50)
Group B: yes 20, no 30 (row 50)
Column totals: 50 and 50, total 100
Expected each cell = 50 x 50 / 100 = 25

## In practice

Chi-square tests need every expected count to be at least 5 to be reliable.

## Practice

### Flashcards

- **Expected count in a cell of a table?** Row total x column total / grand total.

### Interview questions

**In a 2 by 2 table the observed counts are 30, 20, 20 and 30. Test whether the two variables are independent at the 5% level.**

- Expected count 25 in every cell
- Chi-square = 4.0
- df = 1, critical 3.841
- Reject independence

## Questions people ask

### Why do expected counts need to be at least 5?

The chi-square test relies on a smooth curve approximating discrete counts. When expected counts are tiny, that approximation breaks down and p-values become unreliable. If cells are too small, combine categories or use an exact test such as Fisher's, which does not rely on the curve approximation at all.

### What is the difference between observed and expected counts?

Observed counts are what you actually recorded. Expected counts are what the model or the no-relationship assumption predicts. The test judges whether the gap between them is bigger than random sampling would plausibly cause. A small gap fits chance, while a large gap points to a real pattern or a poor model.

## Related concepts

- [Chi-square test of independence](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-7/statistics-university-part-7-concept-3)
- [Chi-square goodness of fit](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-7/statistics-university-part-7-concept-1)

Web page: https://studyvisually.com/learn/science/statistics-university/statistics-university-part-7/statistics-university-part-7-concept-2
Study this card in the app: https://studyvisually.com/app/learn?category=statistics-university&card=statistics-university-part-7-concept-2
