Grocer Function
NAME
logn_pdf - lognormal probability distribution
CALLING SEQUENCE
[pdf]=logn_pdf(x,a,v)
PARAMETERS
Input
-
x = variable matrix (nxm)
-
a = mean matrix (nxm) or 1 (default=1)
-
v = variance matrix (nxm) (default=1)
Output
-
pdf == (nxm) vector containing pdf for each x
DESCRIPTION
Calculates the probability distribution function of the lognormal distribution for each component of x with mean a, variance v.
NOTES:
The logarithm of a lognormal random deviate is normally distributed with mean = a and variance = v
Could probably be improved and simplified in the line of what is made in gamma_pdf.
EXAMPLES
1) x=logn_pdf([0.2 0.5 1.5],2*ones(1,3),3*ones(1,3))
2) x=logn_pdf([1:5]')
Example 1 provide a (1x3) vector of the probability distribution function of a lognormal law with mean log(2) and variance 3 (for the log of the law) at values 0.2, 0.5 and 1.5. Example 2 provide a (5x1) vector of the probability distribution function of a lognormal law of mean 0 and variance 1 (for the log of the law) at values 1, 2, 3, 4 and 5.
AUTHOR
Eric Dubois 2002