BYTETOOLS

Random Numbers by Distribution

Draw seeded random samples from uniform, normal, log-normal, exponential, Poisson and binomial distributions, with sample stats, a histogram and CSV export.

Parameters

-0.0075
Sample mean
1.0300
Sample SD
0.000
Expected mean
1.000
Expected SD
-2.8566
Lowest
0.0376
Median
2.6312
Highest

Distribution of this sample

-2.86
2
-2.46
3
-2.07
6
-1.68
9
-1.29
21
-0.90
24
-0.50
19
-0.11
35
0.28
30
0.67
23
1.06
13
1.46
9
1.85
1
2.24
5

200 draws

-0.9711
-0.5593
-1.4110
0.6978
0.5598
1.7021
-0.1296
-1.0960
-0.8753
0.3032
1.0892
0.3462
0.4216
-1.0991
-1.4432
1.0650
0.9378
0.6636
-0.0174
1.1742
2.2117
0.7522
-0.0482
0.5676
-0.2388
-1.8063
-1.1991
0.8394
1.7238
-0.7264
0.0820
-0.0888
-0.0371
0.0613
-1.0871
-0.2984
1.0378
-1.9666
0.0297
-0.5400
-0.4739
-1.5341
1.1921
0.6555
-1.2265
-0.8480
0.9814
0.5728
0.9771
0.9246
1.7799
-0.0115
0.0432
0.5036
-0.9437
0.9271
0.2816
-1.2025
-0.5410
-0.6881
-1.3677
0.8174
0.2826
2.3820
-0.0855
-1.4131
1.1080
0.0312
-0.0834
0.5168
-0.9653
-2.0417
0.1351
1.1013
0.1405
-2.2600
-0.2706
-2.8566
1.3050
1.0798
-0.0270
0.3900
0.8738
0.9149
0.3484
0.6602
0.3302
0.4853
0.0217
-0.6118
-2.0792
-1.4409
-0.3901
1.5796
-1.6416
-0.3918
0.1857
0.4334
-0.4337
-0.1742
-0.5678
1.3087
0.8305
-0.6806
2.5854
0.5709
-0.2390
-0.0225
0.3718
-1.9740
0.3505
0.7875
1.5787
0.4269
-1.0025
0.3759
-0.5475
-1.1235
-0.4753
-0.0508
0.1225
0.5436
0.0520
-1.4499
-0.5637
-0.9770
0.1366
-0.0619
0.0790
0.9870
-0.9721
-0.7316
2.2754
1.1727
-0.5867
-0.6939
0.0321
-0.8166
-0.8467
0.1835
1.5157
0.2352
1.5186
-0.3300
-0.5152
0.2013
-0.9617
0.1150
0.2409
-0.9828
0.5530
-2.7941
1.0390
0.6854
0.8532
-2.1839
-1.2714
-0.3603
1.6328
1.1774
0.6166
-0.5918
-1.1623
0.4983
-0.3709
-0.6684
0.7052
1.0545
-1.1506
-0.2270
0.5046
-1.2109
0.2633
-1.1068
0.2433
0.2796
2.6312
1.5082
-0.2644
0.6746
-0.6879
-1.8541
-1.4499
0.0897
-0.3050
2.2966
-0.3425
1.0247
-0.8344
-0.6041
1.1514
-0.8839
-1.1175
-0.3470
-1.7929
-0.0121
1.3683
0.1070
0.3825
0.7457

Every distribution is built from one seeded uniform stream. Normal values use the Box-Muller transform, the log-normal exponentiates a normal, exponential values come from the inverse CDF −ln(u)/λ, Poisson counts use Knuth’s product method, and binomial counts sum n Bernoulli trials. Compare the sample mean and SD above with the expected values to see how quickly a small sample stops looking like its own distribution.

All the sampling happens in your browser — no data is uploaded and the tool works offline. Because the stream is seeded it is reproducible and therefore predictable, which makes it ideal for test fixtures and entirely unsuitable for anything that must be secret.

What is the Random Numbers by Distribution?

Most random number tools only give you a flat, uniform range. Real data rarely looks like that: heights cluster around a mean, waiting times bunch near zero with a long tail, and event counts follow a Poisson shape.

  • Six distributions: uniform, normal, log-normal, exponential, Poisson and binomial
  • Box-Muller for normals and Knuth's method for Poisson counts
  • Sample mean and SD shown beside the theoretical values
  • Automatic text histogram with sensible bin counts
  • Up to 20000 draws per run, seeded and reproducible
  • Copy the values or export them as CSV

How to use the Random Numbers by Distribution

  1. 1

    Choose a distribution — uniform, normal, log-normal, exponential, Poisson or binomial.

  2. 2

    Fill in that distribution's parameters, such as mean and standard deviation, or lambda.

  3. 3

    Set the sample size and the number of decimal places to display.

  4. 4

    Compare the sample mean and SD against the expected values in the stats row.

  5. 5

    Read the histogram to check the shape, then copy the values or download the CSV.

About the Random Numbers by Distribution

Most random number tools only give you a flat, uniform range. Real data rarely looks like that: heights cluster around a mean, waiting times bunch near zero with a long tail, and event counts follow a Poisson shape. This generator draws samples from six named distributions so your test data actually resembles the thing you are modelling.

Every distribution is built from one seeded uniform stream. Normal values use the Box-Muller transform, the log-normal exponentiates a normal, exponential values come from the inverse CDF minus the natural log of u over lambda, Poisson counts use Knuth's product method, and binomial counts sum n Bernoulli trials. Set your own parameters for each.

The sample mean and standard deviation are shown next to the theoretical values so you can see for yourself how quickly a small sample stops resembling its own distribution. Everything runs in your browser and nothing is uploaded — and because the stream is seeded it is reproducible, which makes it ideal for fixtures and useless for secrets.

Worked example: simulating test scores

Say you need 1,000 realistic exam scores to test a grading dashboard. Choose Normal, set the mean to 100 and the standard deviation to 15, and the sample size to 1000. The Expected mean and Expected SD cards show 100 and 15; the sample values beside them will land close to those, and the histogram should form a bell centred on 100 with roughly two thirds of the draws between 85 and 115.

Keep the seed text the same and you get the identical 1,000 values every time, which makes the data safe to use in a test that must produce the same output on every run. Click Copy values to paste them into a spreadsheet, or CSV to download them with an index column. Copy and CSV both use the number of decimal places you set.

For a count such as support tickets per hour, switch to Poisson with λ = 4: the expected mean is 4 and the expected SD is 2. For waiting times between those tickets, Exponential with a rate of 0.5 gives an expected mean of 2.

Common mistakes

Entering the rate where the mean belongs. The exponential field is a rate: λ = 0.5 means an average wait of 2, not 0.5. The hint under the field shows the conversion.

Reading log-normal μ and σ as the mean and spread of the output. They apply to log(x). With μ = 0 and σ = 1 the expected mean of the values is about 1.65 and the expected SD about 2.16, which the Expected cards confirm.

Using a normal distribution for quantities that cannot be negative. With a large SD relative to the mean, a normal sample will include negative prices or durations; log-normal is usually the better fit.

Judging a distribution from a tiny sample. Twenty draws rarely look like their distribution; compare the sample and expected cards, and raise the sample size (up to 20,000) before drawing conclusions.

Using the output for anything secret. The stream is seeded and therefore reproducible by anyone who knows the seed and settings.

When to use it

Reach for it when you need plausible synthetic numbers with a known shape: fixtures for tests and demos, dummy data for charts, classroom illustrations of how sample statistics converge, or quick Monte Carlo inputs. Changing any parameter or the seed produces a completely new sample, so record both alongside any data you keep.

Frequently asked questions

What is the Box-Muller transform?

It is a way to turn two uniform random numbers into a normally distributed one, using the square root of minus two times the log of the first, multiplied by the cosine of two pi times the second. It is exact rather than approximate, which is why it is the standard approach.

When should I use a Poisson distribution instead of a normal one?

Use Poisson for counts of independent events in a fixed interval — support tickets per hour, arrivals per minute. It only produces whole numbers, and its variance always equals its mean. Use a normal distribution for measurements that vary around a central value.

Why does my sample mean not exactly match the expected mean?

Because it is a sample, not the distribution itself. With a few hundred draws the mean typically lands within a percent or two; with twenty thousand it gets much closer. Watching that gap shrink as you raise the sample size is a useful thing to see.

What is a log-normal distribution used for?

Anything that is always positive and skewed, where the logarithm is normally distributed. Incomes, file sizes, page load times and share prices are commonly modelled this way, because a few very large values sit above a dense cluster of small ones.

Can I reproduce the same random sample later?

Yes. The whole run is driven by a seeded generator, so the same seed, distribution, parameters and sample size always produce the identical list. Note the seed and you can regenerate your fixture exactly.

Need a custom tool or app like this for your business? ByteVancer builds them.

Talk to ByteVancer

Related tools