Rev Language Reference


dnExponential - Exponential Distribution

The Exponential distribution describes the distribution of the times between events in a Poisson point process.

Aliases

  • dnExp

Usage

dnExponential(RealPos lambda, RealPos offset)

Arguments

lambda : RealPos (pass by const reference)
The rate parameter ( rate = 1/mean ).
Default : 1
offset : RealPos (pass by const reference)
The offset of the distribution.
Default : 0

Domain Type

Details

The exponential distribution takes one parameter, lambda, describing the rate (i.e. 1/mean). The probability density function is f(x) = lambda * exp(-lambda*x).

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()