LogNormal | R Documentation |
A random variable created by exponentiating a Normal()
distribution. Taking the log of LogNormal data returns in
Normal()
data.
LogNormal(log_mu = 0, log_sigma = 1)
log_mu |
The location parameter, written |
log_sigma |
The scale parameter, written |
We recommend reading this documentation on https://alexpghayes.github.io/distributions3/, where the math will render with additional detail and much greater clarity.
In the following, let X
be a LogNormal random variable with
success probability p
= p
.
Support: R^+
Mean: \exp(\mu + \sigma^2/2)
Variance: [\exp(\sigma^2)-1]\exp(2\mu+\sigma^2)
Probability density function (p.d.f):
f(x) = \frac{1}{x \sigma \sqrt{2 \pi}} \exp \left(-\frac{(\log x - \mu)^2}{2 \sigma^2} \right)
Cumulative distribution function (c.d.f):
F(x) = \frac{1}{2} + \frac{1}{2\sqrt{pi}}\int_{-x}^x e^{-t^2} dt
Moment generating function (m.g.f): Undefined.
A LogNormal
object.
Other continuous distributions:
Beta()
,
Cauchy()
,
ChiSquare()
,
Erlang()
,
Exponential()
,
FisherF()
,
Frechet()
,
GEV()
,
GP()
,
Gamma()
,
Gumbel()
,
Logistic()
,
Normal()
,
RevWeibull()
,
StudentsT()
,
Tukey()
,
Uniform()
,
Weibull()
set.seed(27)
X <- LogNormal(0.3, 2)
X
random(X, 10)
pdf(X, 2)
log_pdf(X, 2)
cdf(X, 4)
quantile(X, 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.