A small choice, repeated
At every row, a virtual ball chooses right with probability p and left with probability 1 − p. Choices are independent with the same p. The final bin counts how many right turns occurred.
Release a few virtual balls, then a thousand. Change the chance of a right turn and compare the results with a mathematical prediction.
Enable JavaScript to change the conditions and run the interactive experiment.
One random outcome can surprise you. Many independent outcomes reveal a distribution. A prediction describes the chances of different results; it does not promise an exact count in one run.
A fair independent coin has just landed heads five times. What is its chance of heads next?
Independence means previous tosses do not change the next probability. A long-run pattern is not a balancing rule for the very next event.
At every row, a virtual ball chooses right with probability p and left with probability 1 − p. Choices are independent with the same p. The final bin counts how many right turns occurred.
The number of right turns follows a binomial distribution. More paths lead to middle counts than to the extremes when p is one half. Biasing each choice shifts the distribution; it need not remain symmetric.
The colored bars are observed counts. Gold ticks are expected counts for the selected sample size. A larger sample often gives closer proportions, but another seed can move them away again. Chance does not owe you a correction after a streak.
For n independent choices, P(X = k) = C(n,k)pᵏ(1 − p)ⁿ⁻ᵏ. C(n,k) counts the possible orders of k right turns. Probabilities sum to one. At n = 4 and p = 0.5, bin probabilities are 1, 4, 6, 4, 1 divided by 16.
E[X] = np and Var(X) = np(1 − p). The expected number in bin k is sample size × P(X = k). Expected need not mean most likely, and an expected count can be fractional.
A versioned 32-bit pseudorandom generator supplies uniform draws, compared with p. A fixed seed and configuration reproduce the same choices. This is a mathematical Bernoulli board, not a physical collision simulation or cryptographic randomness.
Mark five slips R and five L. Fold them alike, put all ten in the cup and mix. Predict how many R results you will get in twenty draws.
Without looking, draw one slip, tally the letter, return it to the cup and mix again. Repeat twenty times. Replacement keeps the composition fixed; mixing helps avoid a predictable draw.
Count R outcomes. Repeat another twenty draws if you like. Compare each run and the combined proportion with one half. Discuss why an imperfect mix or distinguishable slips can change the experiment.
Will a 50% chance give exactly half successes in twenty tries?
Paper draws approximate independent random sampling. Keep small slips away from very young children; an adult can handle drawing. The result does not prove fairness.
Introductory Statistics 2e §3.2, independence and sampling examples. Supports the streak question and replacement/mixing rationale.
OpenStax · IndependenceIntroductory Statistics 2e §4.3, binomial conditions, formula, mean and standard deviation. Supports bin probabilities and moments.
OpenStax · Binomial distributionIntroductory Statistics 2e §3.1, probability terminology and law of large numbers. Supports the distinction between predicted chance and observed count.
OpenStax · Probability basicsIndependent subject review is pending.
Read the sources and model assumptions