|
STK++ 0.9.13
|
LogNormal distribution law. More...
#include <STK_Law_LogNormal.h>

Public Types | |
| typedef IUnivLaw< Real > | Base |
Public Member Functions | |
| LogNormal (Real const &mu=0., Real const &sigma=1.) | |
| Constructor. | |
| virtual | ~LogNormal () |
| Destructor. | |
| Real const & | mu () const |
| Real const & | sigma () const |
| void | setMu (Real const &mu) |
| void | setSigma (Real const &sigma) |
| Real | rand () const |
| Generate a pseudo log-normalized LogNormal random variate. | |
| virtual Real | pdf (Real const &x) const |
| virtual Real | lpdf (Real const &x) const |
| virtual Real | cdf (Real const &t) const |
| Compute the cumulative distribution function at t of the standard log-normal distribution. | |
| virtual Real | icdf (Real const &p) const |
| Compute the inverse cumulative distribution function at p of the standard log-normal distribution. | |
Public Member Functions inherited from STK::Law::IUnivLaw< Real > | |
| virtual | ~IUnivLaw () |
| Virtual destructor. | |
| virtual Real | lcdf (Real const &t) const |
| compute the lower tail log-cumulative distribution function Give the log-probability that a random variate is less or equal to t. | |
| virtual Real | cdfc (Real const &t) const |
| calculate the complement of cumulative distribution function, called in statistics the survival function. | |
| virtual Real | lcdfc (Real const &t) const |
| calculate the log-complement of cumulative distribution function Give the log-probability that a random variate is greater than t. | |
Public Member Functions inherited from STK::Law::ILawBase | |
| String const & | name () const |
Static Public Member Functions | |
| static Real | rand (Real const &mu, Real const &sigma) |
| Generate a pseudo LogNormal random variate. | |
| static Real | pdf (Real const &x, Real const &mu, Real const &sigma) |
| static Real | lpdf (Real const &x, Real const &mu, Real const &sigma) |
| static Real | cdf (Real const &t, Real const &mu, Real const &sigma) |
| Compute the cumulative distribution function at t of the standard log-normal distribution. | |
| static Real | icdf (Real const &p, Real const &mu, Real const &sigma) |
| Compute the inverse cumulative distribution function at p of the standard log-normal distribution. | |
Protected Attributes | |
| Real | mu_ |
| The location parameter. | |
| Real | sigma_ |
| The scale parameter. | |
Protected Attributes inherited from STK::Law::ILawBase | |
| String | name_ |
| Name of the Law. | |
Additional Inherited Members | |
Protected Member Functions inherited from STK::Law::IUnivLaw< Real > | |
| IUnivLaw (String const &name) | |
| Constructor. | |
| IUnivLaw (IUnivLaw const &law) | |
| copy Constructor. | |
Protected Member Functions inherited from STK::Law::ILawBase | |
| ILawBase (String const &name) | |
| Constructor. | |
| ~ILawBase () | |
| destructor. | |
LogNormal distribution law.
In probability theory, a log-normal (or loglog-normal) distribution is a continuous probability distribution of a random variable whose logarithm is log-normally distributed. Thus, if the random variable X is log-normally distributed, then Y = log(X) has a log-normal distribution. Likewise, if Y has a log-normal distribution, then X = exp(Y) has a log-normal distribution. A random variable which is log-normally distributed takes only positive real values.
A variable might be modeled as log-normal if it can be thought of as the multiplicative product of many independent random variables, each of which is positive.
The probability density function of a log-normal distribution is:
![\[
f_X(x;\mu,\sigma) = \frac{1}{ x\sigma \sqrt{2 \pi}}\,
e^{-\frac{(\ln x - \mu)^2}{2\sigma^2}},\ \ x>0
\]](form_245.png)
where 
Definition at line 70 of file STK_Law_LogNormal.h.
Definition at line 73 of file STK_Law_LogNormal.h.
|
inlinevirtual |
Compute the cumulative distribution function at t of the standard log-normal distribution.
| t | a real value |
Implements STK::Law::IUnivLaw< Real >.
Definition at line 77 of file STK_Law_LogNormal.cpp.
Compute the cumulative distribution function at t of the standard log-normal distribution.
| t | a real value |
| mu,sigma | location and scale of the log-normal law |
Definition at line 129 of file STK_Law_LogNormal.cpp.
Compute the inverse cumulative distribution function at p of the standard log-normal distribution.
| p | a probability number. |
Implements STK::Law::IUnivLaw< Real >.
Definition at line 87 of file STK_Law_LogNormal.cpp.
Compute the inverse cumulative distribution function at p of the standard log-normal distribution.
| p | a probability number. |
| mu,sigma | location and scale of the log-normal law |
Definition at line 140 of file STK_Law_LogNormal.cpp.
| x | a real value |
Reimplemented from STK::Law::IUnivLaw< Real >.
Definition at line 68 of file STK_Law_LogNormal.cpp.
| x | a real value |
| mu,sigma | location and scale of the log-normal law |
Definition at line 119 of file STK_Law_LogNormal.cpp.
| x | a real value |
x Implements STK::Law::IUnivLaw< Real >.
Definition at line 61 of file STK_Law_LogNormal.cpp.
| x | a real value |
| mu,sigma | location and scale of the log-normal law |
x Definition at line 110 of file STK_Law_LogNormal.cpp.
|
virtual |
Generate a pseudo log-normalized LogNormal random variate.
Generate a pseudo log-normalized LogNormal random variate with location parameter mu_ and scale sigma_.
Implements STK::Law::IUnivLaw< Real >.
Definition at line 54 of file STK_Law_LogNormal.cpp.
Generate a pseudo LogNormal random variate.
Generate a pseudo LogNormal random variate with location mu and scale sigma parameters.
| mu,sigma | location and scale of the log-normal law |
mu and with scale sigma Definition at line 101 of file STK_Law_LogNormal.cpp.
| sigma | the value to set to sigma |
Definition at line 90 of file STK_Law_LogNormal.h.
References setSigma(), sigma(), sigma_, and STKDOMAIN_ERROR_1ARG.
Referenced by setSigma().
Definition at line 86 of file STK_Law_LogNormal.h.
References sigma_.
Referenced by setSigma().
|
protected |
The location parameter.
Definition at line 170 of file STK_Law_LogNormal.h.
|
protected |
The scale parameter.
Definition at line 172 of file STK_Law_LogNormal.h.
Referenced by setSigma(), and sigma().