AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Extend one run and see what averaging changes.
Heads = 1, tails = 0. The fixed model’s probability of the next head is 0.5, regardless of previous outcomes. The ideal model assumes independent draws from this same fixed distribution. The seeded simulation makes the examples reproducible.
Reveal a longer or shorter prefix of this run; this does not resample it. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Reproduce another sequence while keeping the model probabilities fixed. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Showing the first 20 draws of Fair coin, seed 1309.
Each point is total / draws so far; the line joins discrete draw counts. A longer prefix need not be closer after every draw, and a finite run need not reach the expected value exactly.
Recent individual values, draws 13–20: 1, 0, 0, 0, 1, 1, 1, 1. Newest value: 1.
Average of this shown prefix.
0.5500
11 / 20
Fixed probability-weighted mean.
0.5000
0 × 0.5 + 1 × 0.5
Distance from the model mean.
0.0500
|observed average − expectation|
Absolute total gap = |11 − 20 × 0.5| = 1.0000. Divide by 20 to get the average gap 0.0500.
| Draws | Total | Average | Average gap |
|---|---|---|---|
| 1 | 0 | 0.0000 | 0.5000 |
| 2 | 1 | 0.5000 | 0.0000 |
| 3 | 2 | 0.6667 | 0.1667 |
| 5 | 3 | 0.6000 | 0.1000 |
| 10 | 5 | 0.5000 | 0.0000 |
| 20 | 11 | 0.5500 | 0.0500 |
The model holds the same probabilities for every draw and assumes independence: past results do not alter the next result’s distribution. All three examples have bounded values, hence a finite mean. For independent draws from a fixed distribution with a finite mean, the chance of the average differing from that mean by more than any fixed positive tolerance tends to zero as the draw count grows.
This is an asymptotic statement, not a finite guarantee, a claim of improvement at every step, or a demand that the next result balance earlier ones. It concerns the average rather than the sum or a single outcome. Dependent draws, changing distributions or a source without a finite mean require other analysis.
| Value | Probability |
|---|---|
| 0 | 0.5 |
| 1 | 0.5 |
Run seed starts a deterministic 32-bit pseudorandom generator. Each generated uniform value maps to a coin result or an integer die face. Raising Number of draws extends the same prefix. Lowering it reveals an earlier prefix; it is not fresh sampling. Changing model keeps the underlying uniform stream but remaps outcomes, so displayed runs still use one fixed distribution.
Different seeds can produce different averages, and sometimes equal ones. These finite pseudorandom examples illustrate an ideal independent model; they do not prove randomness, independence, or the law of large numbers. They are not a game prediction tool.