pdfLogNorm

Purpose

Computes the probability density function of the log-normal distribution.

Format

p = pdfLogNorm(x[, mu[, sigma]])
Parameters:
  • x (matrix or array) – data
  • mu (scalar) – Optional input, the mean parameter. Default = 0.
  • sigma (scalar) – Optional input, the standard deviation parameter. Default = 1.
Returns:

p (matrix or array) – of the same dimension as the input x, contains the probabilities of the log-normal distribution.

Examples

Basic Example

// Use default 'mu' and 'sigma'
p = pdfLogNorm(3.1);

After the above, code p will equal:

0.067855420

Specify ‘mu’ and ‘sigma’

// Create vector of 'x' values
x = { 0.1, 1.6, 2 };

mu = 1.5;
sigma = 2;

// Compute the PDF for the lognormal distribution
// parameterized by mu = 1.5 and sigma = 2
p = pdfLogNorm(x, mu, sigma);

After the above, code p will equal:

 0.32727408
 0.10918617
0.091940897

See also

Functions cdfn_cdfNc(), pdfTruncNorm(), cdfTruncNorm(), cdfLogNorm()