Rev Language Reference


dnExponential - Exponential Distribution

Exponential distribution with rate equal to ‘lambda’.

Aliases

  • dnExp

Usage

dnExponential(RealPos lambda)

Arguments

lambda : RealPos (pass by const reference)
The rate ( rate==1/mean) parameter.
Default : 1

Domain Type

Details

The exponential distribution has density: f(x) = 1/r * exp(-lambda*x) where lambda is the rate parameter.

Example

# we set a rate parameter
rate <- 10.0# we create an exponentially distributed random variable
x ~ dnExponential(lambda=rate)
# compute the probability of the variable
x.probability()