StudyVisuallyStart studying
Part 02 · Probability · Card 5 of 8

Conditional probability

Conditional probability is the chance of A once you know B happened: P(A given B) = P(A and B) / P(B). Knowing B shrinks the sample space to B.

Last updated

Analogy

The chance a random person is a student is small. The chance they are a student given that you met them on campus is much higher.

Example

Late given rain

P(rain) = 0.30P(rain and late) = 0.12P(late given rain)= 0.12 / 0.30 = 0.40

In practice

Medical tests, spam filters and risk models all ask how likely something is given new evidence.

Practice

Flashcards

  • Define conditional probability.P(A given B) = P(A and B) / P(B).

Interview questions

  • Explain, with numbers, why a positive result from a good test for a rare disease may still probably be a false alarm.
    • Base rate is low
    • Healthy people far outnumber sick people
    • False positives from the many exceed true positives from the few
    • Apply Bayes' theorem

Questions people ask

Is P(A given B) the same as P(B given A)?

No, and mixing them up is a classic error. Most people who get lung cancer have smoked, but most smokers do not get lung cancer. Bayes' theorem links the two directions when you know the base rates, so you can convert one into the other without guessing.

How does conditional probability change the sample space?

Once you know B happened, only outcomes inside B remain possible. You then ask what fraction of those also belong to A. That is why you divide by P(B): it rescales the shrunken space so its total probability is 1 again.