keisoku

Lognormal Distribution Random Generator

Generate random numbers from a lognormal distribution. Enter the parameters mu and sigma and a count, then click to produce a sample list, histogram, and sample mean and median.

Input

Enter the lognormal parameters mu and sigma and the number of values, then press the generate button to create random numbers.

log mean
log SD
values

Enter a value from 1 to 5000.

Result

Enter the parameters and count, then press the generate button.

How it works

  • The lognormal distribution is the distribution of positive values whose logarithm follows a normal distribution N(mu, sigma^2). If Z is a standard normal random number, then X = exp(mu + sigma * Z) follows the lognormal distribution with parameters (mu, sigma).
  • This tool first draws a standard normal value Z with the Box-Muller method, then computes X = exp(mu + sigma * Z) to produce each lognormal value. Random numbers are generated only when you press the button.
  • The theoretical mean is exp(mu + sigma^2 / 2) and the theoretical median is exp(mu). You can compare these with the sample mean and median of the generated values.
  • Sigma must be positive and the count must be between 1 and 5000. The larger the count, the closer the histogram gets to the shape of the theoretical distribution.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Lognormal Distribution Random Generator