Math
Plinko Probability Explained: Paths, Bins, and Real-World Physics
Many paths can reach the same Plinko bin. Counting those paths explains an ideal board's odds; understanding a real or digital board also means checking what actually determines the result.
Five bins sit below a small Plinko board. They have matching widths, equally prominent labels, and enough room to catch the ball. It is tempting to give each one a 20% chance.
On an ideal board with four independent, equally likely left/right decisions, the middle bin instead receives 37.5% of the probability. Either outer bin receives 6.25%. The difference comes from the journeys available to the ball: six routes lead to the middle, while only one leads to each edge.
Those numbers describe a particular mathematical model. A physical ball brings speed and spin into every collision. A digital version might simulate those collisions, or it might choose a result before the animation begins. Understanding Plinko probability means following the procedure that produces the result, rather than reading the odds from its appearance.
The purpose matters too. A board can choose a discussion prompt, generate a game score, or demonstrate how a distribution develops. For a prompt picker, the question is how often each activity will be offered. For a score game, it is how landing chances combine with printed values. For a classroom demonstration, it is which assumptions the apparatus illustrates. The falling ball can make any of these experiences engaging, but the movement alone does not answer the probability question.
Why the middle receives more paths
Begin with a simplified board. The ball starts at one fixed point above four decision levels. At each level, it moves one step left or one step right through a staggered lattice. Every step has the same horizontal size. After four decisions, the number of right moves tells us which of five final bins it reaches.
Call the bins 0, 1, 2, 3, 4, from left to right. These numbers count right moves; they are not scores. No right moves means the leftmost bin. Four right moves means the rightmost bin. Two right moves and two left moves end at the center, regardless of their order.
Write L for left and R for right. Both LLRR and RLRL reach the center. So do four other sequences:
LLRR, LRLR, LRRL, RLLR, RLRL, RRLL
By contrast, the leftmost bin requires LLLL, and the rightmost requires RRRR. A single rightward step prevents the ball from following the all-left route, even if the other three steps go left.
There are two possibilities at each of four levels, giving 2 × 2 × 2 × 2 = 16 complete paths. If every decision is independent and equally likely to go either way, every particular path has probability:
1/2 × 1/2 × 1/2 × 1/2 = 1/16
The bins collect different numbers of these equally likely paths.
| Bin: right moves | Paths reaching it | Ideal probability |
|---|---|---|
| 0 | 1 | 1/16 = 6.25% |
| 1 | 4 | 4/16 = 25% |
| 2 | 6 | 6/16 = 37.5% |
| 3 | 4 | 4/16 = 25% |
| 4 | 1 | 1/16 = 6.25% |
The path counts add to 16, and the probabilities add to 100%. Every possible path reaches exactly one bin in this model, so nothing is missing or counted twice.
Counting bins would give the right answer only if the bins themselves were equally likely. Here, the equally likely outcomes are the complete sequences. The middle is more likely because it groups more of them together.
Turn path counting into a formula
With more levels, listing every route becomes inconvenient. Instead, choose which positions in the sequence contain right moves.
For four decisions and two rights, there are six ways to choose those two positions. The notation C(4,2) means exactly that. More generally, C(n,k) counts the ways to choose k positions from n positions, without treating a different ordering of the chosen positions as a new choice. It is called a binomial coefficient.
For n independent, equally likely binary decisions, the probability of bin k is:
P(K = k) = C(n,k) / 2^n
Here, K is the number of right moves, k is one possible count from zero through n, and 2^n is the number of complete paths. The formula divides the paths reaching one bin by the total number of equally likely paths.
If you want to calculate the coefficient directly:
C(n,k) = n! / (k! × (n-k)!)
The exclamation mark means factorial: multiply the positive integers up to that number, with 0! defined as 1. For the center of our board, C(4,2) = 24 / (2 × 2) = 6.
This is the fair case of the binomial distribution. If each independent decision instead has the same rightward probability p, the more general formula is:
P(K = k) = C(n,k) × p^k × (1-p)^(n-k)
A particular route contains k right moves and n-k left moves. Multiplication gives that route's probability; the coefficient counts all routes with those totals. Setting p = 1/2 returns the simpler formula above. Dependence between decisions, or different rightward probabilities at different levels, requires further analysis rather than a silent substitution into this formula.
The assumptions doing the work
The ideal model requires more than a symmetrical picture. Every trial must begin from the same starting node, make exactly n binary decisions, and end in the bin identified by its total number of rights. No row is skipped, no extra collision creates a different route, and no ball becomes stuck or escapes. Walls must not redirect the paths being counted.
The decisions must also be independent. Knowing the earlier directions must not change the chance of the next direction. Equal left/right probabilities at each level, considered separately, do not establish that condition.
Consider an invented rule: toss one fair coin, then make all four directions copy it. Half the trials take LLLL; half take RRRR. Every individual level is left half the time and right half the time, but the middle bins never receive a ball. The directions are perfectly linked, so the binomial calculation does not apply.
Consistent starting conditions help define a repeatable experiment, while symmetrical geometry can support a plausible left/right symmetry. Neither makes independent 50/50 deflections a proven property of an actual board. Also, a “decision level” is a feature of this model. Four visible rows of pegs do not guarantee that a real ball experiences exactly four relevant binary collisions.
What the bell curve comparison means
The four-decision distribution has a central peak and matching sides, but it still consists of five separate probabilities. Its shape is discrete: there is no possible bin 2.4.
For a binomial model with a fixed rightward probability strictly between zero and one, increasing the number of independent decisions makes the standardized count approach a normal distribution. This is why a sufficiently large ideal Galton board can produce a histogram resembling a bell curve. NIST's treatment of the normal approximation explains its conditions and how to account for the difference between discrete counts and a continuous curve.
The approximation uses mean n × p and standard deviation sqrt(n × p × (1-p)). For fair directions, these become n/2 and sqrt(n)/2. The mean locates the center; the standard deviation describes the spread in units of the bin index.
There are two different increases to keep separate. More drops help reveal the distribution of a fixed board. More decision levels change the ideal distribution itself and support the normal approximation. A million trials of our four-decision model still have only five possible bin results.
The normal curve also extends indefinitely in both directions, whereas the binomial count cannot fall below zero or exceed n. Approximating a bin's probability therefore means taking an area under the curve, rather than treating its height as a probability. A common adjustment uses the interval from k - 0.5 to k + 0.5; this is the continuity correction.
Even then, a smooth-looking center can conceal a poor estimate of a rare edge result. For ten fair decisions, the exact probability of the all-left bin is 1/1,024 ≈ 0.0977%. The continuity-corrected normal area for that bin is approximately 0.1961%, about twice as large. These are calculated values, not measurements. When the exact binomial calculation is easy, it avoids that approximation error.
Strong directional bias can also make a finite board's distribution visibly skewed. And a bell-shaped physical histogram does not prove that its collisions were independent coin flips. Different mechanisms can produce similar overall shapes. The curve is a useful comparison when its assumptions fit, rather than a distribution that every Plinko board must obey.
A real ball carries its collision history
A ball approaching a peg already has a location, velocity, and rotation. The impact changes those quantities, and they influence how it reaches the next peg. That continuity is precisely what the independent-decision model leaves out.
In Rosato and colleagues' Galton-board study, researchers combined an automated physical apparatus, contact-based simulations, and dynamical models. Their apparatus released spheres one at a time and recorded exits with optical detectors. In the simulations, slightly changing a release position could produce dramatically different trajectories. The paper also qualified its comparisons with physical experiments because the chosen restitution parameter limited quantitative agreement.
That is a useful example of both physical complexity and scientific restraint. A plausible simulated trajectory still needs validation against the apparatus it represents.
Geometry and release conditions shape the available contacts
Ball diameter relative to peg diameter and spacing determines which gaps and impact locations are accessible. A ball might graze a peg, strike it directly, pass through a gap, or meet another obstacle before the contact a simple diagram assumes. Manufacturing differences, worn surfaces, or an imperfectly aligned board can change those encounters.
Release position and velocity matter for the same reason. A centered release from rest and a sideways launch enter the peg field in different states. Gravity drives the descent, while the board's orientation and the release height affect how motion develops before impact. Tiny variations can matter greatly in sensitive trajectories; that does not mean every small variation creates a measurable directional bias.
Ball mass is part of a mechanical description, especially when bodies interact. But changing mass alone does not make an object accelerate faster in ideal gravitational free fall. Real balls of different materials may also differ in size, surface, deformation, and collision behavior. An experiment comparing them must not attribute every difference to weight.
Bounces involve energy, friction, and spin
The coefficient of restitution describes how the normal component of relative separation speed after a collision compares with the normal approach speed before it. It is not the probability of going left, nor is it simply the fraction of total energy retained.
Treating restitution as one fixed “bounciness” setting can be useful in a simulation, but it is an approximation. In sphere-on-plate experiments, King and colleagues reported dependence on impact speed and sphere size. Montaine and colleagues measured fluctuations at fixed impact velocity and proposed that surface roughness could transfer energy between linear and rotational motion. Those findings concern their contact systems; their measured values should not be transplanted into an unrelated peg board.
Friction and spin provide further connections between impacts. A rotating ball can exchange tangential motion with a surface, and its outgoing state becomes the next collision's incoming state. Successive deflections may therefore be correlated. A tendency to continue in a direction can broaden a distribution; a tendency to reverse can narrow it. The direction and size of those effects on a particular board require measurement or a validated model.
Walls are part of the mechanism
A side wall can redirect a ball, limiting or changing the routes available to it. Actual bin openings and dividers also determine which landing positions count as each result. These are physical boundaries, even if they seem secondary to the pegs.
In an experimental and numerical study, Benito and colleagues reported a transition from Gaussian-like to uniform-like exit distributions as lateral walls were brought sufficiently close together. That statement comes from the accessible publisher abstract; it does not provide a universal spacing rule for other boards.
Releasing many balls together introduces another possible influence: they can collide with each other. A distribution measured one ball at a time need not describe a crowded release. For a clean introductory experiment, isolated drops make the conditions easier to document and interpret.
The animation may not choose the winner
Three systems can show a ball falling through pegs while determining their results differently.
On a physical board, the ball moves through an actual apparatus. Its accepted landing determines the bin, subject to the rules for dividers, escapes, or incomplete drops. The unknowns concern the apparatus and release procedure.
In a physics-driven simulation, software updates motion and collisions, then reads the landing location. Geometry, initial conditions, contact rules, time steps, and any interventions all belong to the probability mechanism. Such a simulation models physics to a chosen level of detail; it is not automatically a calibrated replica of a physical board.
In a system that selects the outcome first, a random procedure chooses an option or target, and an animation presents that selection. The probabilities come from the selection procedure. A visually central bin can have the same chance as an outer bin if the software deliberately selects them equally.
These designs can each serve a legitimate purpose. The useful question is whether the stated probabilities match the mechanism and whether the presentation explains it accurately. Realistic movement does not establish an unbiased distribution. Selecting the outcome before animation does not, by itself, make the selection invalid.
A target is different from a settled result
The custom-choice Plinko board in this release candidate samples a weighted target and guides the ball toward it. The reported result follows the bucket in which the ball settles, and that bucket can differ from the selected target. Its weights therefore describe the target-selection step; they are not measured guarantees about final-bin probabilities.
Do not assign binomial or equal-bin probabilities to that board without measurements of the complete procedure. The ideal simulation below tests its own four-decision model, rather than the tool's landing distribution.
Labels turn bins into options
Suppose our five ideal bins choose activities. Assign Stretch to both outer bins, Discuss to the two bins beside the center, and Sketch to the center itself.
| Activity | Bins carrying the label | Combined chance |
|---|---|---|
| Stretch | 0 and 4 | 1/16 + 1/16 = 12.5% |
| Discuss | 1 and 3 | 4/16 + 4/16 = 50% |
| Sketch | 2 | 6/16 = 37.5% |
These probabilities add because the bins are disjoint outcomes: one trial cannot land in two of them. In general:
P(option) = sum of the landing probabilities of its assigned bins
Giving Stretch two bins does not make it as likely as Discuss, which also occupies two bins. Where the bins sit in this distribution matters. Nor do three distinct activity names imply one-third chances.
This mapping changes the chance of an activity being displayed without changing where the ball lands. Changing font size, color, or printed wording has no mathematical effect on the landing model. Changing an actual catchment's geometry can affect physical outcomes; making a graphical label look wider need not change a digital selection procedure.
Explicit weights offer another way to express the same initial activity probabilities. A direct proportional draw with weights 1:4:3 for Stretch, Discuss, and Sketch produces 1/8, 4/8, and 3/8: 12.5%, 50%, and 37.5%. Equal weights 1:1:1 instead give each activity one third, which this five-bin labeling does not achieve.
The general weighted rule is P(option) = its eligible weight / total eligible weight. That rule applies only when the mechanism actually samples in proportion to those weights. Entering a weight beside a physical landing bin does not make gravity honor it.
Scores are another mapping. Keep the same landing distribution, award ten points for either outer bin, and award zero elsewhere. The expected score is 10 × 0.125 = 1.25 points per trial. That average combines scores and landing chances; it does not mean a ball can land in a 1.25-point bin. Editing printed scores changes the expected score without changing the landing probabilities, provided the underlying mechanism remains the same.
If a winning activity is removed before another draw, eligibility or geometry may change. Recalculate the next-draw probabilities under the new procedure. A history containing removals, weight edits, or changed board settings should not be assessed as though every trial used the original distribution.
What a run of drops can tell you
Theoretical probability describes a model. An observed proportion describes recorded results: divide a bin's count by the relevant number of trials. A finite run usually differs from its theoretical proportions even when it is generated under exactly those assumptions.
For N independent repetitions with a constant bin probability q, the expected count is:
Expected count = N × q
Here, N counts complete drops, while the earlier n counts decisions within one drop. Also, q is a final bin's probability, rather than the per-decision rightward probability p.
For 100 repetitions of our ideal board, the center count has expectation 100 × 0.375 = 37.5. A recorded count must be a whole number; the expectation is an average across repetitions of the entire 100-trial experiment.
Under those same assumptions, the count's standard deviation is:
Count standard deviation = sqrt(N × q × (1-q))
For the center, this is sqrt(100 × 0.375 × 0.625) ≈ 4.84. It gives a scale for ordinary count variation, not a hard boundary beyond which bias has been proven. The standard deviation of the observed proportion is sqrt(q × (1-q) / N), which decreases as the trial count grows. These count relationships follow from treating a landing in the chosen bin as a binomial success, as in NIST's reference.
An outer bin can easily stay empty in a short run. For one specified edge bin, the ideal probability of no hits in 20 independent trials is (15/16)^20 ≈ 27.51%. A blank edge column after twenty drops is therefore not strong evidence that the bin is unreachable.
Longer runs make proportions more informative, but several cautions remain. Looking across many bins creates more opportunities to notice something unusual. Stopping when a histogram looks balanced, or rerunning until it looks convincing, changes the evidence. Results from different launch settings should not be pooled without accounting for the changed conditions.
A formal goodness-of-fit test can compare a specified distribution with recorded counts, with attention to independence, expected counts, and the testing procedure. NIST's chi-square guidance describes one such method. A nonsignificant result means the test did not detect a departure under its assumptions; it does not prove exact probabilities, independence, or correct software. Conversely, a discrepancy deserves investigation before it is called evidence of bias.
Even a perfect match of bin totals cannot show whether successive results were linked. Counts summarize where results ended up. They discard the order that might reveal dependence. Keep the sequence as well as the histogram.
Try a reproducible probability experiment
The following comparison uses a newly executed simulation of the four-decision ideal model. It contains no physical pegs or collision solver. Each trial generates four binary pseudorandom values, counts the rights, and records the resulting bin.
The procedure used CPython 3.14.0 and its standard-library random.Random generator. The primary seed was 20261021, with 16,000 trials and exactly four getrandbits(1) calls per trial. Zero represents left; one represents right. Each trial begins from the same abstract starting node. There are no stuck, escaped, or excluded trials because those states do not exist in this model.
The primary seed and trial count were fixed before executing that run and retained afterward. The exact code and two additional specified seeds appear in the research notes, so the comparison does not depend on reproducing an unspecified sampling method.
Exact expectations beside simulated counts
At 16,000 trials, multiplying the ideal bin probabilities by the trial count gives the expected counts below. The simulated counts are actual outputs of the stated program, not values adjusted to resemble those expectations.
| Bin | Expected count | Simulated count | Simulated share |
|---|---|---|---|
| 0 | 1,000 | 957 | 5.98% |
| 1 | 4,000 | 4,102 | 25.64% |
| 2 | 6,000 | 5,957 | 37.23% |
| 3 | 4,000 | 3,961 | 24.76% |
| 4 | 1,000 | 1,023 | 6.39% |
The counts total 16,000. The ideal distribution is symmetrical, yet the simulated left and right counts are unequal. Symmetry concerns their probabilities; it does not require mirrored counts in every sample.
For example, bin 1 exceeds its expectation by 102, while bin 3 falls short by 39. These deviations should be considered alongside sampling variation, rather than read as proof that the left side is favored. The additional runs also differ from the first, without any change to the model.
This demonstration illustrates sampling under the ideal assumptions. It does not independently establish that a physical board satisfies them, measure Retiroll's distribution, or certify the pseudorandom generator. The theoretical probabilities were checked separately by enumerating every possible four-step sequence and comparing those counts with the binomial coefficients.
Bring the comparison to an actual board
To study a physical board, begin by identifying the apparatus. Use a board intended to illustrate four decision levels and five bins if you want to compare directly with this article. Check how its actual paths and boundaries relate to that construction; counting visible rows alone is insufficient. A different board needs its own proposed model.
Before dropping a ball, record the board dimensions, peg diameters and spacing, bin openings, wall positions, and orientation, including left/right leveling. Identify the ball's diameter, mass, material, and surface condition. Mark the release position and height, and use the same release mechanism without deliberately adding sideways velocity or spin. Consistent instructions reduce uncontrolled variation even though they cannot eliminate it.
Plan 200 attempted releases, one ball at a time. Number every attempt. Fix a 30-second observation limit for this activity: if an attempt has not reached an accepted bin by then, record it as stuck or unresolved. This is an operational rule for the exercise, not a universal physical settling time. Define how dividers, escapes, accidental double releases, and recording failures will be classified before beginning.
Use a sequential record such as:
| Attempt | Result | Exception or note |
|---|---|---|
| 1 | — | — |
The blank row is a template, not an observation. Record each bin or exception immediately. Keep every scheduled attempt in the record, including invalid releases, and do not silently replace failures with extra successful drops. Wait until the apparatus is clear before the next release. The planned endpoint stays at 200 attempts whether the histogram looks pleasing or uneven.
Report each bin's count divided by all 200 attempts, alongside separate exception counts. If you also calculate shares among completed landings, label them accordingly and state that denominator. A probability conditional on successful completion answers a different question from the probability of a result per attempted release. A binomial model assigning no probability to failure cannot describe the complete operating behavior of a board that sometimes fails.
If all 200 attempts produce accepted landings and the ideal assumptions are appropriate, the theoretical expected counts are 12.5, 50, 75, 50, 12.5. Those are calculated expectations for the proposed model, not physical results. Compare the full pattern, release consistency, exception record, and sampling variability before drawing conclusions. A mismatch could reveal unsuitable model assumptions as well as an apparatus problem.
For a physics simulation, record its version, board geometry, release conditions, contact parameters, integration step, random generator and seed, and any aiming or modifier settings. State whether a landing or a separately selected target determines the result. A fixed seed alone is insufficient if other inputs or numerical behavior change. If the software does not expose a reproducible seed, retain the actual outcome sequence and disclose that exact replay is unavailable.
Repeat the complete experiment under the same documented conditions to learn how much runs differ. If comparing two settings, plan and interleave the conditions in advance rather than changing them in response to a disappointing histogram. A completed protocol with honest limits is more useful than a collection of selected runs that happen to match a curve.
For choosing activities, equal chances may be the desired rule. For a score game, unequal bin probabilities may be the point. For teaching, the difference between a clean model and a real mechanism is itself worth exploring. In each case, probability becomes useful when the stated rules, the calculation, and the evidence describe the same process.
Sources and research notes
The references below support the mathematical models, research summaries, or practical guidance discussed here. Worked scenarios and suggested activities are editorial examples unless explicitly identified as recorded calculations.
All published numerical examples were independently calculated. Enumeration confirmed the four-decision path counts 1, 4, 6, 4, 1 and the source's six-decision counts 1, 6, 15, 20, 15, 6, 1; each probability distribution sums exactly to one. The normal-approximation example uses mean 5 and standard deviation sqrt(2.5), integrating from -0.5 to 0.5 for the zero-right bin. Percentages in the simulation comparison are rounded to two decimal places.
The supplied PDF's reported 50,000-trial simulation omitted the executable code and generator details needed to reproduce its exact counts. Its linked chart was an unavailable sandbox: asset, rather than an embedded graphic. This article therefore uses the newly executed, fully specified four-decision simulation below. No physical-board experiment was performed for this article.
The main external references are:
- NIST, Binomial Distribution: the binomial mass function, mean, and standard deviation.
- Zhan-Qian John Lu, NIST Technical Note 2119, Estimating Instrument Performance: with Confidence Intervals and Confidence Bounds, 2020: Section 3.2, on printed pages 11–12, explains the normal approximation and continuity correction.
- Rosato, Blackmore, Buckley, Oshman, and Johnson, Experimental, Simulation and Nonlinear Dynamics of Galton's Board, 2004: author-uploaded full text on physical apparatus, numerical modeling, sensitive trajectories, and limitations of quantitative comparison. The paper appears in International Journal of Nonlinear Sciences and Numerical Simulation 5(4), pages 289–312; the title here follows the paper itself.
- Benito and colleagues, Exit distribution function crossover in a Galton board, 2007: experimental and numerical wall effects. Only the publisher abstract was available for this review; no detailed thresholds or numerical measurements from the full paper are claimed.
- King and colleagues, Inelastic impact of a sphere on a massive plane, 2002 preprint: the accessible author abstract supports the limited statements about impact-speed and size dependence in their experiment.
- Montaine and colleagues, Coefficient of Restitution as a Fluctuating Quantity, 2011: the accessible author abstract reports fluctuations and a proposed roughness/rotation explanation. This is related impact evidence, rather than a measurement of Plinko bin probabilities.
- NIST, Chi-Square Goodness-of-Fit Test: comparison of observed and expected counts, with assumptions and reference-distribution qualifications. No significance test is used here to certify a board or generator.
- Python 3.14 random documentation: the pseudorandom generator,
getrandbits, and reproducibility considerations. This educational simulation is not intended for security-sensitive selection.
The tool note reflects the separately reviewed release candidate's target selection and settled-bucket callback. No final-bin distribution, real apparatus calibration, or live-service behavior was measured for this article. The supplied ideal-model run identifies Python 3.14.0; its listed counts were also reproduced during publication preparation on Python 3.13.2.
Reproduce the ideal-model comparison
This standard-library code was executed on CPython 3.14.0. It first enumerates the complete small-board sample spaces, independently of the pseudorandom experiment. It then starts a fresh generator for each of the three listed seeds and makes exactly four one-bit calls per trial, with no other random calls in between. outcomes preserves the complete bin sequence for each run in memory; rerunning the code reconstructs those sequences in the stated environment.
The second and third runs are additional examples, not replacements selected for a closer match. Python documents limits to reproducibility guarantees across versions, so retain the runtime and sampling method as well as the seed when comparing exact output.
import sys
from collections import Counter
from fractions import Fraction
from itertools import product
from math import comb, sqrt
from random import Random
LEVELS = 4
TRIALS = 16000
SEEDS = (20261021, 20261022, 20261023)
print("Python:", sys.version.split()[0])
# Exact enumeration, not simulated observations.
for levels in (4, 6):
paths = Counter(sum(bits) for bits in product((0, 1), repeat=levels))
routes = [paths[k] for k in range(levels + 1)]
assert routes == [comb(levels, k) for k in range(levels + 1)]
assert sum(routes) == 2**levels
probabilities = [Fraction(count, 2**levels) for count in routes]
assert sum(probabilities) == 1
print(f"{levels} decisions, routes:", routes)
probabilities = [Fraction(comb(LEVELS, k), 2**LEVELS)
for k in range(LEVELS + 1)]
expected = [TRIALS * p for p in probabilities]
print("Expected counts:", [int(value) for value in expected])
# Reference simulation: 0 = left, 1 = right; bin = number of rights.
for seed in SEEDS:
rng = Random(seed)
outcomes = [sum(rng.getrandbits(1) for _ in range(LEVELS))
for _ in range(TRIALS)]
counts = Counter(outcomes)
observed = [counts[k] for k in range(LEVELS + 1)]
assert len(outcomes) == sum(observed) == TRIALS
assert all(0 <= value <= LEVELS for value in outcomes)
print("Seed:", seed, "Counts:", observed)
if seed == SEEDS[0]:
print("Primary shares (%):",
[f"{100 * count / TRIALS:.2f}" for count in observed])
print("Center count SD in 100 trials:", f"{sqrt(100 * .375 * .625):.2f}")
The output is:
Python: 3.14.0
4 decisions, routes: [1, 4, 6, 4, 1]
6 decisions, routes: [1, 6, 15, 20, 15, 6, 1]
Expected counts: [1000, 4000, 6000, 4000, 1000]
Seed: 20261021 Counts: [957, 4102, 5957, 3961, 1023]
Primary shares (%): ['5.98', '25.64', '37.23', '24.76', '6.39']
Seed: 20261022 Counts: [1034, 3935, 5979, 4063, 989]
Seed: 20261023 Counts: [1040, 3938, 6018, 4009, 995]
Center count SD in 100 trials: 4.84