TrueWedge

Test the odds

Run a wheel ten thousand times and see where it actually landed, against what its geometry promised. Any wheel — this page takes one out of the link, so the button on the editor brings whatever you have built.

Spins

How does TrueWedge choose a result?

The browser's cryptographic generator, crypto.getRandomValues, produces two 32-bit numbers which are combined into a fraction between zero and one carrying the full 53 bits a JavaScript number can hold. That fraction is compared against the slices' shares of the circle. There is no modulo and no remainder to fold in, so nothing is favoured by rounding: on a coin, exactly half of the 253 fractions the generator can produce fall on one face and exactly half on the other. Where the code does need a whole number rather than a fraction — choosing which demo wheel a first visit loads — it uses rejection sampling, discarding draws in the short band above the last exact multiple and drawing again, because taking a remainder there would favour the low outcomes very slightly.

Why the simulation solves the landing too

Because a fair draw landing on the wrong slice is still an unfair wheel, and the draw is the half less likely to be wrong. Each simulated spin runs the whole sequence a real spin runs: the generator picks a slice, the rotation that puts that slice under the pointer is solved, and then the page reads back which slice the pointer is actually over — and counts that one. Every run reports how many times those two disagreed. It should always be none.

This is the part that makes a run evidence about the wheel rather than evidence about a random number generator, which is a much smaller and much less interesting claim.

I flipped a coin a hundred times and got sixty tails

Almost certainly nothing is wrong. Over a hundred flips of a perfectly fair coin the number of tails has a standard deviation of five, so sixty is two standard deviations out — which happens about once in every eighteen sessions of a hundred flips. Fifty-five to forty-five, which looks lopsided, happens more than a third of the time.

The number that matters is how many trials it takes to see a bias that is really there. Detecting a bias of one percentage point — a coin that lands tails 51% of the time — with a four-in-five chance of catching it takes roughly 39,000 flips. A hundred flips cannot distinguish a fair coin from a slightly loaded one in either direction. That is not a failing of the hundred flips; it is what a hundred flips is. It is also the whole reason this page runs ten thousand at a time, and why the funnel on the second chart is drawn.

What a good result here does not prove

A run that comes out typical is evidence that no large bias is present. It is not proof that no bias is present at all, and nothing could be. This page runs the same code the wheel runs, in your browser, so a fault common to both would be invisible to it — it can catch a wheel whose geometry and whose odds have come apart, and it cannot audit the browser's own generator.

One run in twenty comes out below the 5% mark on a wheel that is perfectly fair, so a single unusual result is a reason to run it again rather than a finding. What the page does establish is narrower and still worth having: that the odds the geometry draws are the odds the spins produce, at the scale tested, on your machine.

Testing your own wheel

Build a wheel anywhere on the site — weight it however you like — and press Test the odds under the editor. The wheel travels in the link, the same way it travels when you copy one to share, so what gets tested here is exactly what you built. Weighted slices are tested against the weights you typed, and a slice weighted to nothing is expected to win nothing and is marked as taking no part.

The full wheel is at truewedge.app.

Status

TrueWedge is being built. This page needs JavaScript, because the simulation runs in your browser and nowhere else.