Weighted Random Selection – Custom Probabilities | dice83 

Weighted Random Selection

Random selection where each option has a different probability. Set weights in the URL for full transparency.

or press Space
Statistics
0
Total
Favorite
Accuracy

Transparent Non-Uniform Randomness

Most random generators promise uniformity: every outcome equally likely. This tool does the opposite. You declare the weights, the URL encodes them, and the selection respects them exactly. Visit /weighted/70/20/10 and the URL itself is the proof: Option A appears 70% of the time, B appears 20%, C appears 10%. The bias is the feature, and it is visible to everyone who sees the link.

The Selection Algorithm

The tool normalizes your weights into a probability distribution, then uses crypto.getRandomValues() to generate a 32-bit unsigned integer. That integer maps into the cumulative weight ranges. For weights 70/20/10 (total 100), values 0-69 select A, 70-89 select B, and 90-99 select C. The modulo bias at 232 is negligible: less than one in forty million for a total weight of 100. Each selection is independent and draws from the same entropy source that secures your browser's HTTPS connections.

Convergence to Declared Weights

The statistics panel tracks your picks and shows actual percentages alongside expected percentages. Early picks deviate wildly. After 50 selections, the actual distribution typically settles within 5 percentage points of the declared weights. After 200, within 2-3 points. The option rows color-code the deviation: green when the actual percentage is close to expected, amber for moderate deviation, red for large deviation. Watch the colors shift from red to green as the law of large numbers takes hold.

Use Cases

Weighted selection appears in game design (common/uncommon/rare item drops), experimental protocols (unequal treatment group assignment), marketing (A/B/C test traffic allocation), classroom activities (giving struggling students higher selection probability for volunteer opportunities), and decision-making with prior preferences. The URL-encoded weights provide auditable transparency: anyone with the link can verify the exact probabilities.

In the Classroom

Weighted randomness teaches students the difference between uniform and non-uniform probability distributions. Start with /weighted/50/50 (equivalent to a fair coin) and make 50 picks. Then switch to /weighted/80/20 and make 50 more. Compare how quickly the actual frequencies converge to the declared weights. The visual feedback of the option bars and color-coded accuracy makes abstract probability theory immediately tangible.

Customize Through the URL

Weights are slash-separated path segments. Add up to five:

Choose a Weight Distribution

Pick a preset or type weights separated by slashes in the URL.

Share This Configuration

The URL encodes the exact weights. Recipients see the same probabilities.

Design excellence, every day.

Jury-selected work from the A' Design Award, presented fresh each morning.