RandomNextLogNormal Method |
Generate a pseudorandom number from a lognormal distribution.
Namespace: Imsl.StatAssembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax public virtual double NextLogNormal(
double mean,
double stdev
)
Public Overridable Function NextLogNormal (
mean As Double,
stdev As Double
) As Double
public:
virtual double NextLogNormal(
double mean,
double stdev
)
abstract NextLogNormal :
mean : float *
stdev : float -> float
override NextLogNormal :
mean : float *
stdev : float -> float
Parameters
- mean
- Type: SystemDouble
A double which specifies the mean of the underlying normal
distribution.
- stdev
- Type: SystemDouble
A double which specifies the standard deviation of the
underlying normal distribution. It must be positive.
Return Value
Type:
Double
A
double which specifies a pseudorandom number from a
lognormal distribution.
Remarks
Method NextLogNormal generates pseudorandom numbers from a
lognormal distribution with parameters mean and stdev.
The scale parameter in the underlying normal distribution,
stdev, must be positive. The method is to generate normal
deviates with mean mean and standard deviation stdev
and then to exponentiate the normal deviates.
With and
, the probability density function for the lognormal
distribution is
The mean and variance of the lognormal distribution are
and
,
respectively.
See Also