Bitpath

Lesson 2 · Unit 03

Conditional probability

What you believe after seeing the evidence

13 exercisesabout 3 min

What you practise

  • P(A given B), independence, Bayes' rule on the classic rare-disease test, prior and posterior

Try a question from this lesson

Pick one

In a class of 20, 8 students wear glasses, and 5 of those 8 also play chess. Among the students with glasses, what share plays chess?

The ideas

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

Given that

P(A | B) is read "the probability of A given B". The bar means: look only at the cases where B happened, and ask how often A is true among them.

The formula says the same thing: the share where both happen, divided by the share where B happens.

P(A | B) = P(A and B) / P(B)

P(chess | glasses)
   = (5/20) / (8/20)
   = 5/8

Concept

Bayes' rule

Bayes' rule flips a conditional probability around. It turns "how likely is this evidence if I am sick?" into "how likely am I sick, given this evidence?".

The belief before the evidence is the prior. The belief after it is the posterior. A rare disease has a small prior, and one positive test cannot lift it far.

P(A | B) = P(B | A) × P(A) / P(B)

P(sick | +) = 0.90 × 0.01 / 0.0981

prior      P(sick)      = 0.01
posterior  P(sick | +)  ≈ 0.09

10 more exercises in the app

  • 3× type the answer
  • 1× true or false
  • 4× multiple choice
  • 1× fill the blanks
  • 1× order the lines

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy