Probability

Maths · Class 12

Simulation · Maths · Class 12

Flip the condition

"Flip the condition" is a free, interactive Class 12 Maths simulation for JEE, built on the lesson "Bayes' theorem" in Probability. The width is split into rainy and dry mornings. In each column the solid part is the mornings the bus is late: 60% of rainy mornings, and a share of dry mornings that you set. The bar below keeps only the late mornings. Bayes' theorem is one piece divided by the total: P(rain | late) = P(rain) P(late | rain) ÷ P(late). The answer depends on the prior P(rain) and on how often the evidence also turns up in the other case.

From the lesson Bayes' theorem in Probability. Change the values and watch what happens.

Flip the conditionMaths · Class 12

The idea behind it

NCERT §13.5, Example 16

  • The reverse question: a result A has been observed; how likely is it that it came through a particular case Eᵢ? We are given P(A|Eᵢ) and want P(Eᵢ|A).
  • Bayes' theorem: if E₁, …, Eₙ form a partition of S and A is an event with P(A) ≠ 0, then for each i, P(Eᵢ|A) = P(Eᵢ)P(A|Eᵢ) ÷ P(A), where P(A) = Σ P(Eⱼ)P(A|Eⱼ) is the total over all n parts.
  • Proof in two lines: P(Eᵢ|A) = P(A ∩ Eᵢ)/P(A). The numerator is P(Eᵢ)P(A|Eᵢ) by the multiplication rule, and the denominator is P(A) written out by total probability.
  • On a tree: the branch through Eᵢ that ends in A, divided by the sum of all branches that end in A.
  • Vocabulary: the Eᵢ are the hypotheses, P(Eᵢ) is the a priori (prior) probability of a hypothesis, and P(Eᵢ|A) is its a posteriori (posterior) probability. The Eᵢ act as possible causes of A, which is why the theorem is also known as the formula for the probability of "causes".
  • The posterior probabilities P(E₁|A), …, P(Eₙ|A) add to 1.
  • Bag I has 3 red and 4 black balls, Bag II has 5 red and 6 black. A bag is picked at random and a ball drawn from it is red. P(Bag II | red) = (1/2)(5/11) / [(1/2)(3/7) + (1/2)(5/11)] = 35/68.
  • The theorem carries the name of Thomas Bayes and appeared in print in 1763, after his death.

Questions

2 answers

What does the "Flip the condition" simulation show?
The width is split into rainy and dry mornings. In each column the solid part is the mornings the bus is late: 60% of rainy mornings, and a share of dry mornings that you set. The bar below keeps only the late mornings.
Is this simulation free?
Yes. It is free and runs in the browser on a phone or a laptop. It belongs to the lesson "Bayes' theorem" in Probability (Class 12 Maths).

Embed this simulation

Free, with a link back

Teaching this idea? Put the simulation on your own page or LMS with this code.