Skip to content
Statistics

What is conditional probability?

The probability of an event given that another event has happened: P(A | B) = P(A and B) / P(B). Knowing that B happened shrinks the outcomes to those where B holds, and A's probability is recomputed within them.

datasciencetrivia.com

Card 1 of 276. Answer: The probability of an event given that another event has happened: P(A | B) = P(A and B) / P(B). Knowing that B happened shrinks the outcomes to those where B holds, and A's probability is recomputed within them.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Conditioning restricts the sample space. Two events are independent when conditioning changes nothing, P(A | B) = P(A). Rearranging the definition gives the multiplication rule, P(A and B) = P(A | B) P(B), which extends to the chain rule for many events, the basis of probabilistic models from naive Bayes to language models.

Example: of 1,000 site visitors, 300 are on mobile and 100 convert, 60 of them on mobile. P(convert | mobile) = 60 / 300 = 20%, while P(mobile | convert) = 60 / 100 = 60%. The two are easy to confuse and usually different; mixing them up is known as the prosecutor's fallacy, and Bayes' theorem is how you get from one to the other.

A classic interview puzzle: a family has two children and at least one is a boy. The probability that both are boys is 1/3, not 1/2, because the condition leaves three equally likely cases (boy-boy, boy-girl, girl-boy) and only one has two boys. Writing out the reduced sample space is the safest way to answer these.

All questions