Lognormal Distribution Calculator
Thanks to this lognormal distribution calculator, you can quickly compute probabilities, quantiles, samples, and many other things for every value of the parameters for the lognormal distribution!
Read the text below to find out what the parameters for the lognormal distribution are! You'll find the definition of the lognormal distribution along with the formula for the probability density function of the lognormal distribution. Everything you need to know about the lognormal distribution is explained - even the formulas for the mean, variance, and median of the lognormal distribution! 😀
Lognormal distribution explained
A lognormal (or log-normal) distribution is a continuous probability distribution. We say that a random variable X
is lognormally distributed if ln(X)
is normally distributed. Equivalently, if a random variable Y
has a normal distribution, then exp(Y)
has a lognormal distribution. (As always, ln
denotes the natural logarithm and exp
is the natural exponential function.)
As we can easily deduce, a random variable that follows the lognormal distribution assumes only positive values!
🙋 Go to the normal distribution calculator and the natural log calculator if you need a quick refresher on the notions we've mentioned above!
If you need to analyze data that follow the lognormal distribution, you can exploit the relationship which links the normal and lognormal distributions:
- Normalize your data by applying the logarithmic transformation.
- You can apply any method which assumes that the data follows a normal distribution.
- Make the inverse transformation.
How to use this lognormal distribution calculator?
As we have explained the lognormal distribution, let's discuss how you can use our lognormal distribution calculator to compute whatever you want (as long as it's related to the lognormal distribution!)
-
Decide on the calculator mode, based on what you need to calculate: this lognormal distribution calculator has as many as six modes! Select a common measures option to estimate, e.g., the mean of lognormal distribution.
-
Enter the parameters for the lognormal distribution.
-
If needed, fill in the remaining fields. For instance, the
pdf mode
asks for the value of the argument at which the calculator will evaluate the probability density function of the lognormal distribution. For thesample generator mode
, tell us how many elements you need in your sample. -
That's it! Our lognormal distribution calculator determines the results as fast as lightning! ⚡
Lognormal distribution definition
We give the definition of the lognormal distribution in terms of its pdf
. Namely, the formula for the probability density function of the lognormal distribution reads:
where σ
and μ
are the parameters for lognormal distribution:
μ
is the scale parameter; andσ
is the shape parameter.
In the plot below you can see some lognormal distribution examples. We have kept μ = 0
and only changed the value of σ
to show you how the shape of the probability density function changes:
The formula for the cumulative density function of the lognormal distribution is:
where Φ
is the cdf of the standard normal distribution.
Alternatively, we can express the cdf with the help of the error function erf
, which, for a complex number z
, we define as:
We can write the cdf of the lognormal distribution as:
In the plot below you can see how the shape of the cumulative density function changes as we alter σ
while keeping μ = 0
(we guess this is another few lognormal distribution examples):
The quantile function of the lognormal distribution (i.e., the inverse of the cdf) is:
where 0 ≤ p < 1
.
In the next section, you can find the formula for the mean of the lognormal distribution and several other common measures. Keep reading!
Lognormal distribution formulas
Assume that X
is a random variable following the lognormal distribution with parameters μ
and σ
. It is crucial that you remember that μ
and σ
are the mean and standard deviation of ln X
, not of X
! For X
we have the following formulas:
-
Mean of the lognormal distribution:
exp(μ + σ² / 2)
-
Median of the lognormal distribution:
exp(μ)
-
Mode of the lognormal distribution:
exp(μ - σ²)
-
Variance of the lognormal distribution:
[exp(σ²) - 1] ⋅ exp(2μ + σ²)
-
Skewness of the lognormal distribution:
[exp(σ²) + 2] ⋅ √[exp(σ²) - 1]
Applications of the lognormal distribution (examples)
The lognormal distribution is one of the most useful distributions in mathematical modeling, especially in reliability analysis to model failure times (another one is the Weibull distribution). Lognormal distributions appear in chemistry (molar mass distributions), economics/finance (income distribution, stock prices), hydrology (monthly maximum values of daily rainfall), and also in more down-to-earth situations. You can see that:
- The length of comments people leave online;
- The time a social media user spends reading a post; and
- The amount of Internet traffic per unit time.
approximately follow the lognormal distribution! 🤯