Step by step
The question
Question: A survey asked boys and girls: yes or no?
Boys: 5 yes, 15 no.
Girls: 10 yes, 10 no.
One person is picked at random.
Find P(yes), P(girl or yes) and P(yes given girl).
1 Make the table
One row for each group, one column for each answer, and a total for each.
The four counts go inside.
Row totals: 5 plus 15 is 20.
10 plus 10 is 20.
Column totals: 15 and 25.
And 40 people in all.
The totals sit at the edges, in the margins.
2 A total over all
All the yes: 15.
Everyone: 40.
So P of yes is 15/40.
Careful!
The bottom is everyone, 40.
Not only the other 25.
Both 15 and 40 can be divided by 5.
So it is 3/8.
3 Add, take away the overlap
Girl: 20.
Yes: 15.
But 10 are both.
They are in both totals.
The or rule: add the two, then take away the overlap, so it is counted once.
Same bottoms: 20 plus 15 minus 10 is 25.
So it is 25/40.
Both 25 and 40 can be divided by 5.
So it is 5/8.
4 Keep only the given row
Given girl: only this row counts.
In it: 10 yes, out of 20.
So P of yes given girl is 10/20.
Both 10 and 20 can be divided by 10.
So it is 1/2.
So: P of yes is 3/8.
P of girl or yes is 5/8.
P of yes given girl is 1/2.
5 Check
Let's check.
The four cells add up to 40, everyone.
The table is right.
And the two cells of yes add up to its total: 5 plus 10 is 15.
So the answer is right!
Let's look back.
First: make the table.
Then: a total over all.
Then: add, take away the overlap.
Then: keep only the given row.
Last: check.