# Lognormalb: The Log Normal Distribution parameterized through its mean... In mc2d: Tools for Two-Dimensional Monte-Carlo Simulations

## Description

Density, distribution function, quantile function and random generation for a log normal distribution whose arithmetic mean equals to mean and standard deviation equals to sd.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19``` ```dlnormb(x, mean = exp(0.5), sd = sqrt(exp(2) - exp(1)), log = FALSE) plnormb( q, mean = exp(0.5), sd = sqrt(exp(2) - exp(1)), lower.tail = TRUE, log.p = FALSE ) qlnormb( p, mean = exp(0.5), sd = sqrt(exp(2) - exp(1)), lower.tail = TRUE, log.p = FALSE ) rlnormb(n, mean = exp(0.5), sd = sqrt(exp(2) - exp(1))) ```

## Arguments

 `x, q` vector of quantiles. `mean` the mean of the distribution. `sd` the standard deviation of the distribution. `log, log.p` logical. if 'TRUE' probabilities 'p' are given as 'log(p)'. `lower.tail` logical. if 'TRUE', probabilities are P[X ≤ x], otherwise, P[X > x]. `p` vector of probabilities. `n` number of observations. If 'length(n) > 1', the length is taken to be the number required.

## Details

This function calls the corresponding density, distribution function, quantile function and random generation from the log normal (see `Lognormal`) after evaluation of meanlog = log(mean^2 / sqrt(sd^2+mean^2)) and sqrt{(log(1+sd^2/mean^2))}

## Value

dlnormb gives the density, plnormb gives the distribution function, qlnormb gives the quantile function, and rlnormb generates random deviates. The length of the result is determined by n for rlnorm, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.

The default mean and sd are chosen to provide a distribution close to a lognormal with meanlog = 0 and sdlog = 1.

`Lognormal`
 ```1 2 3 4 5``` ```x <- rlnormb(1E5,3,6) mean(x) sd(x) dlnormb(1) == dnorm(0) dlnormb(1) == dlnorm(1) ```