Contingency Tables (Vierfeldertafel)
Why do we need this table?
Imagine this problem: "70% are vaccinated, 5% of the vaccinated got sick, 20% of the unvaccinated got sick." Your head is spinning from all those percentages!
A Vierfeldertafel (German for "four-field table") organizes everything for you. Instead of juggling percentages in your head, you put everything into a table and see the complete picture.
On the EPM exam, these problems appear constantly. Good news: once you master the table, solving them becomes almost automatic.
How the table works
The idea is simple: we have people (or objects) and divide them by two characteristics. For example:
- Characteristic A: vaccinated / not vaccinated
- Characteristic B: got sick / stayed healthy
This gives us 4 groups, hence the name "four-field":
| Sick | Healthy | Total | |
|---|---|---|---|
| Vaccinated | vaccinated AND sick | vaccinated AND healthy | total vaccinated |
| Not vaccinated | not vaccinated AND sick | not vaccinated AND healthy | total not vaccinated |
| Total | total sick | total healthy | TOTAL |
The golden rule: numbers in a row add up to the row total, numbers in a column add up to the column total. It's like Sudoku: if you know some numbers, you can figure out the rest.
How to fill in the table: step-by-step
Let's work through a concrete example.
Problem: 70% of the population is vaccinated. Among the vaccinated, 5% got sick. Among the unvaccinated, 20% got sick.
Step 1: Choose a convenient total number
Percentages are fractions of a whole. To avoid messy decimals, let's pretend we have exactly 1000 people (you could use 100, but 1000 is easier when percentages give decimals).
Step 2: Fill in what we know directly
- Vaccinated: 70% of 1000 = 700 people
- Unvaccinated: the rest = 300 people
| Sick | Healthy | Total | |
|---|---|---|---|
| Vaccinated | ? | ? | 700 |
| Not vaccinated | ? | ? | 300 |
| Total | ? | ? | 1000 |
Step 3: Translate "of them X% got sick"
Here's where people mess up! "Of the vaccinated, 5% got sick" means:
- Take the 700 vaccinated people
- Calculate 5% of 700 (not of 1000!)
- We get: people
Same for the unvaccinated:
- 20% of 300 = people
| Sick | Healthy | Total | |
|---|---|---|---|
| Vaccinated | 35 | ? | 700 |
| Not vaccinated | 60 | ? | 300 |
| Total | ? | ? | 1000 |
Step 4: Fill in the rest
Now it's just arithmetic:
- Healthy vaccinated:
- Healthy unvaccinated:
- Total sick:
- Total healthy:
| Sick | Healthy | Total | |
|---|---|---|---|
| Vaccinated | 35 | 665 | 700 |
| Not vaccinated | 60 | 240 | 300 |
| Total | 95 | 905 | 1000 |
Step 5: Check your work
Add up the totals: ✓
Now we can answer any question from this table!
How to calculate probabilities from the table
Regular probability: "what's the probability that a random person is sick?"
This is the easiest. We look: 1000 people total, 95 are sick.
The intuition: if you randomly pick someone from a crowd of 1000, about 95 of them would be sick. So your chance of "landing on" a sick person is 95 out of 1000.
Conditional probability: "if someone is sick, what's the probability they were vaccinated?"
This is trickier. We're told: "the person is already sick." This means we're not picking from all 1000; we're picking only from the 95 sick people.
Among these 95 sick people, 35 were vaccinated.
The intuition: imagine only sick people are standing in front of you (95 of them). How many were vaccinated? 35. That's your answer: 35 out of 95.
The key difference
- Regular probability: divide by the total count (all 1000)
- Conditional probability: divide by the count of those we already know something about (only the sick, only the vaccinated, etc.)
The bar "|" is read as "given that." means the probability of A, knowing that B has already happened.
Watch out: common trap!
and are different numbers!
From our table:
- (among sick people, 37% are vaccinated)
- (among vaccinated people, 5% are sick)
It's like "all cats are animals" doesn't mean "all animals are cats."
Example with an incomplete table
On the exam, you'll often get a table with missing values. Don't panic: use the sum rule.
Problem:
| Passed | Failed | Total | |
|---|---|---|---|
| Studied | ? | 15 | 60 |
| Didn't study | 20 | ? | ? |
| Total | ? | ? | 100 |
Solve it like a puzzle:
-
How many who studied passed? The "Studied" row totals 60, and 15 failed. So passed:
-
How many didn't study? Total 100, studied 60. So:
-
How many who didn't study failed? The "Didn't study" row totals 40, and 20 passed. So:
-
Column totals: passed , failed
| Passed | Failed | Total | |
|---|---|---|---|
| Studied | 45 | 15 | 60 |
| Didn't study | 20 | 20 | 40 |
| Total | 65 | 35 | 100 |
Independence of events
Sometimes they ask: "Does sickness depend on vaccination?" or "Are events A and B independent?"
The intuition: events are independent if knowing about one tells you nothing about the other. For example, the color of your socks doesn't affect your exam grade; these are independent events.
How to check using the table:
If events are independent, then the proportion of B among A is the same as the proportion of B among everyone:
Or put differently: the probability of "both happening" equals the product of individual probabilities:
Example:
| B | not B | Total | |
|---|---|---|---|
| A | 20 | 30 | 50 |
| not A | 20 | 30 | 50 |
| Total | 40 | 60 | 100 |
Let's check:
- ✓
They're equal! So A and B are independent.
Worked Examples
Example 1: Completing a table
In a school with 400 students, 180 play sports. 240 are girls, of whom 100 play sports.
| Sports | No Sports | Total | |
|---|---|---|---|
| Girls | 100 | 140 | 240 |
| Boys | 80 | 80 | 160 |
| Total | 180 | 220 | 400 |
Calculation: Total boys: . Boys playing sports: . Boys not playing sports: .
Answer: Boys play sports more often (50% vs. 41.7%).
Example 2: Checking independence
From the table above: Are "Sports" and "Gender" independent?
Since , the events are not independent.
Common exam mistakes
Mistake 1: Confusing "of them" with "of all"
"Of the vaccinated, 5% got sick" means 5% of the vaccinated, not of everyone!
Wrong:
Right:
Mistake 2: Mixing up P(A|B) and P(B|A)
Read the question carefully:
- "If sick, what's the probability of being vaccinated?" → look among the sick
- "If vaccinated, what's the probability of getting sick?" → look among the vaccinated
Mistake 3: Forgetting to check the sums
After filling in the table, make sure:
- Each row adds up to its total
- Each column adds up to its total
- The grand total = N
If something doesn't add up, you made an arithmetic error somewhere.
Cheat sheet
Regular probability:
Conditional probability (A given B):
Independence: or
Pro tip: always build the table. Even if you think you can solve it "in your head," the table will save you from mistakes.
Check Your Understanding
Your turn1 of 2
In a company 25% of the employees work part-time. Of the part-time employees, 14% commute by train, and of the full-time employees, 2%. What share of the train commuters works part-time?
Your turn2 of 2
Of 250 respondents, 150 do sport regularly and 125 are vegetarian. 50 respondents do sport but are not vegetarian. What share of those who do sport is vegetarian?
Formulas to Remember
Sum rule: Every row and column of the contingency table adds up to its marginal total.
Conditional probability:
Independence: and are independent
Complement:
Union: , equivalently
Exam tip: Always fill in the marginal totals first, then the inner cells; this way you avoid arithmetic errors.
Was this article helpful?