Random Distribution Generator
Draw up to 5,000 samples from common probability distributions for statistics teaching, simulation seeds, A/B-test sanity checks, queueing-theory estimates, or generating test data with a realistic shape. Each distribution has its own parameter set (range, mean/stddev, rate, probability, mode), and the result is shown as a histogram with bin count, plus summary statistics (mean, standard deviation, min, max, median). The underlying randomness comes from `crypto.getRandomValues` — much higher quality than `Math.random` — and the Normal sampler uses the Box-Muller transform.
How to use
- Pick a distribution and adjust its parameters.
- Set the sample count (up to 5,000) and decimals.
- Click Generate to produce the samples — the histogram and stats update live.
- Copy as CSV, JSON, or newline-separated lines.
Frequently asked questions
- How are samples generated?
- All uniform `[0, 1)` randomness comes from `crypto.getRandomValues(Uint32Array)`, normalized to a double in `[0, 1)`. Normal uses Box-Muller; exponential uses inverse CDF (-ln U / λ); Poisson uses Knuth's algorithm for λ < 30 and a normal approximation above; Bernoulli is a single comparison; triangular uses the inverse-CDF formula.
- Is this cryptographically secure?
- The underlying `crypto.getRandomValues` is — but the transformations (e.g., Box-Muller) preserve only statistical quality, not cryptographic guarantees. Use this for simulations and stats, not for keys or tokens.
- Why does the histogram look jagged for small N?
- Finite-sample noise. For a 'cleaner' bell curve from the Normal distribution, raise the sample count and/or reduce the bin count.
- What's the triangular distribution for?
- Useful when you have a rough min/most-likely/max estimate (e.g., project task durations in PERT analysis) and need a bounded distribution that's not flat.
Related tools
Coin Flip Simulator
Flip a coin one or ten thousand times — see the heads/tails ratio, the longest run, and (for small samples) the full sequence.
Weighted Random Picker
Pick names or options with custom weights — like a non-uniform raffle. See each option's true probability and draw with or without replacement.
Playing Card Drawer
Draw N cards from a properly shuffled 52-card deck (optional jokers), with deck-tracking so you don't draw the same card twice.
Password Generator
Generate strong, random passwords that never leave your browser.
Random Number Generator
Generate cryptographically random numbers in any range — with or without duplicates, optionally sorted.
Lottery Number Generator
Generate random tickets for 8 popular lotteries (Powerball, EuroMillions, Lotto 6/45, Loto 6, 双色球…) — uses crypto-secure RNG.