Home / Probability

Probability Basics

Roll dice thousands of times and watch the messy experimental frequencies settle onto the exact theoretical answer. Probability is what happens in the long run — not what happens next.

Controls


The chart compares the experimental frequency with the theoretical probability as trials accumulate.

Experimental Frequency vs Theory

law of large numbers

Live Calculation

P(A)
0
P(B)
0
P(A and B)
0
P(A or B)
0
Sample space — every equally likely outcome

Probability Basics

Counting outcomes, combining events, and why a fair coin owes you nothing.

Quick Context

Probability measures how likely something is, on a scale from 0 (impossible) to 1 (certain). When every outcome is equally likely it is pure counting:

P(event) = favourable outcomes / total outcomes

Sample Space and Events

The sample space is the complete list of things that could happen — the tiles shown under the chart. An event is any subset of it: "even number", "greater than 4". Selecting events A and B highlights their tiles, and tiles in both are the intersection.

Getting the sample space right is most of the work. For two dice there are 36 equally likely outcomes but only 11 possible sums — and those sums are not equally likely, which is why the two-dice chart is a triangle rather than a flat line.

Combining Events

P(not A) = 1 − P(A) P(A or B) = P(A) + P(B) − P(A and B)

That subtraction is the part people forget. Adding P(A) and P(B) double-counts every outcome living in both events, so you remove one copy. Pick two overlapping events and check the arithmetic against the live numbers.

When events cannot happen together — mutually exclusive — the overlap is 0 and the rule simplifies to plain addition.

Independence

Two events are independent when knowing one happened tells you nothing about the other. The test is arithmetic:

independent ⇔ P(A and B) = P(A) × P(B)

The app checks this for your chosen events and reports the verdict. It is a genuinely surprising result on a single die: "even" and "greater than 3" are not independent, while "even" and "greater than 4" happen to be — independence is a property of the numbers, not of intuition.

The Law of Large Numbers — and the Gambler's Fallacy

Press Run continuously. Early on the experimental line jumps around wildly; after a few thousand trials it settles onto the theoretical value and stays there.

That is the law of large numbers: averages converge in the long run. What it emphatically does not say is that outcomes "balance out". After ten heads, the next flip is still exactly 50/50 — the coin has no memory. Convergence happens because early flukes are diluted by the growing pile of trials, not because anything corrects them.

Interactive Exploration Guide

  1. Roll 1 a few times. Individual results look nothing like the theory — probability says nothing about single trials.
  2. Now run continuously and watch the gap between the bars and the theoretical markers close.
  3. Reset and note the error at 10, 100 and 10,000 trials. It shrinks roughly with √n — four times the data halves the error.
  4. Switch to two dice. The distribution becomes a triangle peaking at 7, because 7 has six ways to occur while 12 has only one.
  5. Try event pairs and watch the independence verdict flip between "independent" and "dependent".

Key Takeaway

Count the outcomes, define events as subsets, subtract the overlap when combining with OR, and multiply only when events are genuinely independent. Probability describes long-run behaviour — it makes no promise whatsoever about your next roll.

Cheat sheet

Probability Basics

Roll dice thousands of times and watch the messy experimental frequencies settle onto the exact theoretical answer. Probability is what happens in the long run — not what happens next.

MATHS · vizlearn.in/maths/probability_basics.html