One two-way table makes P(A | B), independence and Bayes' theorem easy.
Imagine 200 students. Did they use practice exams, and did they pass?
| Passed | Failed | Total |
|---|
| Practice exams | 90 | 10 | 100 |
| No practice | 60 | 40 | 100 |
| Total | 150 | 50 | 200 |
1. Ordinary probability
Use the whole table.
P(pass)=200150=0.75
2. Conditional probability
"Given practice" means: keep only the Practice exams row.
P(pass∣practice)=10090=0.90
3. The formula says the same thing
P(A∣B)=P(B)P(A∩B)=100/20090/200=0.500.45=0.90
4. Don't flip the bar
"Given pass" means: keep only the Passed column.
P(practice∣pass)=15090=0.60=0.90
5. Independent or not?
Independent means P(A∣B)=P(A). Here 0.90=0.75, so the events are not independent.
6. Bayes' theorem
P(B∣A)=P(A)P(A∣B)P(B)=0.750.90×0.50=0.60
The same 0.60 we read from the table.
Exam tip: turn every conditional probability question into a two-way table first.
Practise on our Practice page or book a tutor.