Probability Sandbox
Probability questions stop being confusing the moment you draw the tree. This one is alive: bend the branches and watch every answer recompute — then roll a thousand virtual dice and see the theory come true. For Grade 11–12 (Ontario MDM4U and equivalents).
Multiply along, add across
A tree diagram is two rules wearing a diagram costume:
Each branch carries a probability, and thicker branches are more likely. A leaf at the end of a path is "this and that happened" — multiply the branches to get there. A question like "what's the chance of a traffic jam at all?" collects several leaves — add them up.
Bend the tree 🌳
Pick a scenario, then drag the three sliders. The branch widths, leaf products and both answers update live. Hit 🎲 to simulate 1,000 runs and compare "got" with "expect".
What to watch
Total probability (orange)
P(jam) = P(rain)·P(jam | rain) + P(no rain)·P(jam | no rain). You're just adding the two leaves where the jam happened. That's the law of total probability — no formula sheet required once you see the tree.
Bayes flips the question (purple)
"Given there was a jam — did it rain?" Take the rain-and-jam leaf and divide by all the jam leaves. Same tree, read backwards. That fraction is Bayes' rule.
Now load the Medical test scenario: the test catches 95% of sick people and false-alarms on only 10% of healthy ones — yet a positive result means just a 16% chance of actually being sick. The tree shows why: healthy people are so numerous that their few false alarms outnumber the true ones. This one result confuses doctors in real studies; you can now re-derive it by dragging a slider.