Calculate the conditional probability P(A|B)=P(A and B)/P(B) and understand how a new condition changes a probability.
Contingency table: sports and gender
Choice of sport by gender — 200 students
A contingency table makes it quick to calculate conditional probabilities. For example, P(swimming | female) = 30/80 = 0.375.
Lesson notes
Conditional probability: updating when a condition is known
Sometimes we have extra information that changes the probability of an event. For example, if we know that a person smokes, that affects the probability that they have lung problems. This “updated” probability is called a conditional probability and is written P(A|B) — “the probability of A given B.”
Formula: P(A|B) = P(A and B) / P(B). Here P(A and B) is the probability that both events happen, and P(B) is the probability of the condition. In effect, we “narrow” the sample space to the cases where B has already happened and look at what share of them A takes up.
Important: P(A|B) and P(B|A) are different quantities. The probability that a person is sick given a positive test is not the same as the probability of a positive test given that the person is sick. Mixing them up is a common mistake.
Example: in a class of 100 students, 40 play sports, and 30 of them got an A on the exam. In total, 50 students got an A. P(sports|A student) = 30/100 ÷ 50/100 = 30/50 = 0.6. P(A student|sports) = 30/40 = 0.75. See? Different numbers.