SpecEnvoy
EN·中文

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:

along a path: multiply   ·   across paths: add

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.

The 🎲 button is the other half of statistics: theory says 285 out of 1,000, the dice say 291 — close, but never exact. That gap between probability and frequency is where the whole subject lives. Back to all maths tools.
More statistics tools
Available now
Data & the Normal Curve
Mean, spread & the bell
Drag a data set together and watch the mean, median, mode, range and standard deviation react — then see the 68–95–99.7 bell curve appear. Why the mean chases an outlier and the median doesn't.
Open the demo →
Available now
Line of Best Fit
Regression & correlation
Drag a cloud of points and find the least-squares line that fits them best, with the residuals it minimises — then measure the strength of the link with the correlation r and r².
Open the demo →