← Blog

Is a Marble Race a Fair Draw? We Ran 5,000 Races

· 8 min read

The lanes are not equal — the two edges take up to 56% of the wins. What makes the draw fair is the shuffle that hands out lanes, not the course itself.

A race you can watch is not the same as a draw you can trust

A marble race picker is a lottery with a story. Names go in, marbles roll down a board full of pegs and spinners, and the first one through the funnel wins. Nobody argues with it, and that is the point: a number appearing out of nowhere invites a challenge, while a marble bouncing for ten seconds in front of everyone does not.

But watchability is not fairness. So we took the marble race on this site and ran it 5,000 times with the screen switched off — 1,000 races on each of the five maps, eight marbles each — and counted who won.

The short version: the course is wildly unfair, and the draw is fair anyway. The gap between those two sentences is the interesting part, and it applies to every random picker you use, not just this one.

What a headless race is

The outcome here is not an animation with a predetermined winner. A 32-bit seed is drawn at the start, a seeded generator runs from it, and the physics is the draw: every marble position, every collision, every finishing place comes out of that one number. Feed the same seed, the same names and the same course to a different device and you get the same finishing order.

That property is what makes measurement possible. Drop the canvas, keep the physics, and a race that takes fifteen seconds to watch takes a few milliseconds to compute. The board is 500 by 1240 units, marbles have a radius of 9, gravity adds 0.038 per substep with four substeps a frame, and restitution is 0.5 off pegs, 0.45 off walls and 0.3 marble-to-marble. Every map ends in the same funnel, and the order through its 68-unit exit is the finishing order.

One number was recorded per race: the winner's starting lane. Marbles are placed across the top of the board, so sorting the eight of them by starting x gives lane 1 on the far left through lane 8 on the far right.

The lanes are not equal, and it is not close

On the default storm course, over 1,000 races, a fair board would give each lane about 125 wins. Here is what it gave instead.

Lane12345678
Wins1165335365088175447

The far-right lane won 44.7% of the races. Lane 3 won 3.5%. That is a factor of 12.8, and the chi-square statistic is 1,075.7 against a 5% critical value of 14.07 at seven degrees of freedom, so no amount of patience will explain it as noise.

All five maps have the same U-shaped profile. Outside lanes win, middle lanes lose, and the two edge lanes — a quarter of the board — take between 42.6% and 56.3% of all victories.

MapEdge lanes (1 and 8)Middle four (3 to 6)Best laneWorst lane
Storm56.3%20.9%44.7%3.5%
Factory54.5%21.8%32.1%3.4%
Warp49.1%28.7%28.0%5.4%
Labyrinth44.2%30.9%28.1%7.3%
Carnival42.6%30.1%25.4%5.7%

Wall-riding, not wind

The storm course has two crosswind bands blowing in opposite directions, which looked like the obvious culprit. It was not. Deleting the wind entirely and rerunning 400 races left the right lane on 170 wins, against 172 with the wind in place. Flipping the wind direction moved the bias to the other side without shrinking it.

Timing how long each lane takes to reach the funnel entrance says what is really happening.

Starting lane13478
Seconds to the funnel13.315.115.711.48.0
Average finishing place4.315.235.313.802.60

A marble starting in the middle spends nearly twice as long getting down the board. It has to cross the peg field head-on, and each peg hit adds a random tangential kick, which sends it into the next peg. An edge marble grazes the end of every row instead. Wall restitution is 0.45, low enough that it does not bounce back into the field, so it slides down pressed against the wall. The dullest trajectory on the board is also the fastest one.

This is a property of geometry, not of this particular course. Put obstacles in a rectangle and the middle of the rectangle has more of them within reach; the edges always have a shortcut. Any marble picker with fixed lanes has this bias somewhere in it.

And yet the names come out even

Here is the part that rescues the tool. Names are not assigned to lanes in the order you type them. The code builds evenly spaced lane positions, shuffles that list, and then hands out names — so the first line of your list starts somewhere different every race.

Counting the same 5,000 races by input position instead of by lane gives a completely different picture. Eight names over 1,000 races again expects 125 wins each.

MapWins by input position, lines 1 to 8Chi-square
Storm132 128 139 115 118 114 131 1234.51
Carnival125 123 130 128 136 112 100 14611.15
Labyrinth128 134 142 130 110 115 124 1176.35
Factory148 124 123 121 148 121 110 10513.76
Warp138 124 130 113 119 129 139 1087.01

Every map sits under the 14.07 threshold. The same data that produced a statistic of 1,075 by lane produces 4.51 to 13.76 by name. The unfairness of the course has not gone anywhere — it is just being handed to a different person every time, which is exactly what a shuffle is for.

So the fairness of a marble race does not live in the marbles. It lives in one line of code that shuffles the starting slots. That generalises: when you judge any random picker, the question is not whether the mechanism looks unbiased, it is whether the assignment of participants to positions is randomised. A wheel with segments in a fixed order and a pointer that favours one arc has the same problem. So does a ladder draw where everyone picks their own column before the lines are drawn.

First place and last place cost different amounts of time

There are two rules to pick from. First past the post ends the race the moment one marble crosses the line; last place has to wait for the slowest marble. Forfeits usually want the second one, and it is two to three times longer.

MapFirst place, 8 marblesAll finished, 8 marblesAll finished, 20 marbles
Labyrinth7.5s17.3s23.5s
Factory9.0s25.1s26.4s
Warp9.5s25.0s27.7s
Storm10.1s24.5s28.2s
Carnival14.7s42.6s54.2s

Those are medians at normal speed. Adding marbles makes first place arrive sooner, not later — twenty marbles on the labyrinth produce a winner in 6.5 seconds, because with more marbles in play the chance that one of them finds a clean line goes up. Full completion goes the other way, since the stragglers at the back are what you are waiting for.

One more measurement worth having before you pick a map. Counting how often the first marble into the funnel fails to win gives a comeback rate: 61.1% on the labyrinth, 47.8% on warp, 39.6% on storm, 20.3% on carnival, 16.7% on factory. Carnival is the noisiest course by far, averaging 106 collisions a race against the labyrinth's 3, and it is also the most predictable one — its trampolines and belts shake the marbles about without reordering them. If you want the result in doubt until the last second, the quiet map with the teleport tunnels is the one to choose.

When a wheel is the better instrument

A spinning wheel and a marble race are not competing versions of the same thing. The wheel draws one random number, picks a segment and animates the pointer into it, so it finishes in a couple of seconds and, because the segments have widths, it can carry weights: give an entry twice the arc and it wins twice as often. A marble race cannot do that. What it gives you instead is a full ranking from one run, which is what you actually need for presentation order or a cleaning rota.

So: a menu decision at lunchtime is a wheel. Deciding who presents first in front of eight people who all have opinions is a race. Pairing names to items one-to-one is a ladder draw, and splitting a group into sides is team generator work.

The limits worth stating out loud

The seed comes from the browser's ordinary random number generator, which is approximately uniform and not cryptographically strong. Fine for who buys coffee; not fine for anything where predicting the result is worth money. A prize draw with legal exposure needs a procedure participants can audit, not a physics toy.

And the course bias measured above is real, so treat any picker that seats people in fixed positions with suspicion. This one re-draws the lane assignment on every start, which is the only reason the lane bias does not reach the names. Everything else is manners: agree the rule before rolling, roll once, run it on a screen everybody can see, and if the same name keeps coming up, remove winners from the list rather than re-rolling until you like the answer. Random results cluster. That is what random looks like.

Related tools