AZ Tools

Random Distribution Generator

Random

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

  1. Pick a distribution and adjust its parameters.
  2. Set the sample count (up to 5,000) and decimals.
  3. Click Generate to produce the samples — the histogram and stats update live.
  4. 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