# 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.

Statistics (university) · Part 02: Probability · Card 5 of 8 · Last updated 2026-10-19

## 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.30
P(rain and late) = 0.12
P(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.

## Related concepts

- [Bayes' theorem](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-2/statistics-university-part-2-concept-7)
- [Law of total probability](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-2/statistics-university-part-2-concept-6)

Web page: https://studyvisually.com/learn/science/statistics-university/statistics-university-part-2/statistics-university-part-2-concept-5
Study this card in the app: https://studyvisually.com/app/learn?category=statistics-university&card=statistics-university-part-2-concept-5
