You are here: Symbol Reference > RndGenerators Namespace > Classes > TRngStream Class > public > TRngStream.RandomLogNormal Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TRngStream.RandomLogNormal Method

Generates an array of samples distributed Lognormally.

Pascal
procedure RandomLogNormal(const Dst: TMtxVec; const mu: double; const sigma: double; const b: double; const beta: double);

Returns random numbers distributed according to the Lognormal probability density function (PDF) similar to as defined here Probabilities.LogNormalPDF. Additional parameters are "b" is displacement and beta is scale factor: 

 

1 sqr( ln((x - b)/beta) - mu) f(x) = ---------------------*exp( - ----------------------------) , x > b sigma*(x-b)*sqrt(2Pi) 2*sqr(sigma) f(x) = 0, x <= b

 

The number of samples generated is defined with the Dst.Length parameter. The result can be accessed via Dst.Values property.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!