Skip to content

Probability Playground

The unit square is everything that can happen. Drag the vertical line to change how common B is; drag the horizontal lines to change how often A happens with and without B. P(B | A) is the share of the dark-blue area within all shaded area.

width = P(B) · heights = P(A | B), P(A | ¬B) · shaded = A

Area model (eikosogram): P(B) = 0.010, P(A|B) = 0.900, P(A|¬B) = 0.050; P(A) = 0.0585; P(B|A) = 0.1538

All probabilities are exact (closed form or enumeration of the finite sample space). The simulation draws from a seeded generator and converges to the exact value at rate 1/√n — it illustrates the law of large numbers, it does not define the probability.

P(A) = 0.059, P(B|A) = 0.154

Formula

P(A) = P(A|B)P(B) + P(A|¬B)P(¬B)P(B|A) = P(A|B)P(B) / P(A)

When B is rare, even a very accurate test yields mostly false positives: the light-red area dwarfs the dark-blue one. Independence means the two horizontal lines are at the same height.

Method: Exact probabilities (closed form, enumeration); seeded simulation as illustration · Synthetic, seeded data. Illustrative, not an empirical finding.

Validation: Not yet validated against an external reference · integrated