ns3::LogNormalVariable Class Reference
[Random Variable Distributions]

Log-normal Distributed random var

LogNormalVariable defines a random variable with log-normal distribution. If one takes the natural logarithm of random variable following the log-normal distribution, the obtained values follow a normal distribution. This class supports the creation of objects that return random numbers from a fixed lognormal distribution. It also supports the generation of single random numbers from various lognormal distributions. More...

#include <random-variable.h>

Inheritance diagram for ns3::LogNormalVariable:

Inheritance graph
[legend]
Collaboration diagram for ns3::LogNormalVariable:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LogNormalVariable (double mu, double sigma)


Detailed Description

Log-normal Distributed random var

LogNormalVariable defines a random variable with log-normal distribution. If one takes the natural logarithm of random variable following the log-normal distribution, the obtained values follow a normal distribution. This class supports the creation of objects that return random numbers from a fixed lognormal distribution. It also supports the generation of single random numbers from various lognormal distributions.

The probability density function is defined over the interval [0,+inf) as: $ \frac{1}{x\sigma\sqrt{2\pi}} e^{-\frac{(ln(x) - \mu)^2}{2\sigma^2}}$ where $ mean = e^{\mu+\frac{\sigma^2}{2}} $ and $ variance = (e^{\sigma^2}-1)e^{2\mu+\sigma^2}$

The $ \mu $ and $ \sigma $ parameters can be calculated from the mean and standard deviation with the following equations: $ \mu = ln(mean) - \frac{1}{2}ln\left(1+\frac{stddev}{mean^2}\right)$, and, $ \sigma = \sqrt{ln\left(1+\frac{stddev}{mean^2}\right)}$


Constructor & Destructor Documentation

ns3::LogNormalVariable::LogNormalVariable ( double  mu,
double  sigma 
)

Parameters:
mu mu parameter of the lognormal distribution
sigma sigma parameter of the lognormal distribution


The documentation for this class was generated from the following file:

Generated on Fri Apr 9 15:01:09 2010 for NS-3 by  doxygen 1.5.8