Last chance! 50% off unlimited learning
Sale ends in
Density, distribution function, quantile function, and random generation
for the lognormal distribution with parameters mean
and cv
.
dlnormAlt(x, mean = exp(1/2), cv = sqrt(exp(1) - 1), log = FALSE)
plnormAlt(q, mean = exp(1/2), cv = sqrt(exp(1) - 1),
lower.tail = TRUE, log.p = FALSE)
qlnormAlt(p, mean = exp(1/2), cv = sqrt(exp(1) - 1),
lower.tail = TRUE, log.p = FALSE)
rlnormAlt(n, mean = exp(1/2), cv = sqrt(exp(1) - 1))
vector of quantiles.
vector of quantiles.
vector of probabilities between 0 and 1.
sample size. If length(n)
is larger than 1, then length(n)
random values are returned.
vector of (positive) means of the distribution of the random variable.
vector of (positive) coefficients of variation of the random variable.
logical; if TRUE
, probabilities/densities
logical; if TRUE
(default), probabilities are
dlnormAlt
gives the density, plnormAlt
gives the distribution function,
qlnormAlt
gives the quantile function, and rlnormAlt
generates random
deviates.
Let meanlog=
sdlog=
mean=
cv=
dlnormAlt
, plnormAlt
, qlnormAlt
, and
rlnormAlt
call the R functions dlnorm
,
plnorm
, qlnorm
, and rlnorm
,
respectively using the following values for the meanlog
and sdlog
parameters:
sdlog <- sqrt(log(1 + cv^2))
,
meanlog <- log(mean) - (sdlog^2)/2
Forbes, C., M. Evans, N. Hastings, and B. Peacock. (2011). Statistical Distributions. Fourth Edition. John Wiley and Sons, Hoboken, NJ.
Johnson, N. L., S. Kotz, and N. Balakrishnan. (1994). Continuous Univariate Distributions, Volume 1. Second Edition. John Wiley and Sons, New York.
Limpert, E., W.A. Stahel, and M. Abbt. (2001). Log-Normal Distributions Across the Sciences: Keys and Clues. BioScience 51, 341--352.
Ott, W.R. (1995). Environmental Statistics and Data Analysis. Lewis Publishers, Boca Raton, FL.
Singh, A., R. Maichle, and N. Armbya. (2010a). ProUCL Version 4.1.00 User Guide (Draft). EPA/600/R-07/041, May 2010. Office of Research and Development, U.S. Environmental Protection Agency, Washington, D.C.
Singh, A., N. Armbya, and A. Singh. (2010b). ProUCL Version 4.1.00 Technical Guide (Draft). EPA/600/R-07/041, May 2010. Office of Research and Development, U.S. Environmental Protection Agency, Washington, D.C.
Lognormal, elnormAlt
,
Probability Distributions and Random Numbers.
# NOT RUN {
# Density of the lognormal distribution with parameters
# mean=10 and cv=1, evaluated at 5:
dlnormAlt(5, mean = 10, cv = 1)
#[1] 0.08788173
#----------
# The cdf of the lognormal distribution with parameters mean=2 and cv=3,
# evaluated at 4:
plnormAlt(4, 2, 3)
#[1] 0.8879132
#----------
# The median of the lognormal distribution with parameters
# mean=10 and cv=1:
qlnormAlt(0.5, mean = 10, cv = 1)
#[1] 7.071068
#----------
# Random sample of 3 observations from a lognormal distribution with
# parameters mean=10 and cv=1.
# (Note: the call to set.seed simply allows you to reproduce this example.)
set.seed(20)
rlnormAlt(3, mean = 10, cv = 1)
#[1] 18.615797 4.341402 31.265293
# }
Run the code above in your browser using DataLab