Skip to contents

S(x) = exp(-x / scale), as R's dexp(rate = 1 / scale) and SciPy's expon; scale is the mean. Memoryless, so every layer moment is in closed form. Property: d@scale.

Usage

exponential_distribution(mean, ptr = NULL)

Arguments

mean

Finite and positive: the mean, the distribution's scale.

ptr

Internal: an existing object to wrap.

Value

An exponential_distribution object, which inherits from distribution.

Details

Supports the same operations as pareto.

Examples

d <- exponential_distribution(2)
survival(d, 3)
#> [1] 0.2231302
layer(d, 1, 3) # memoryless: survival(d, 3) * lev(d, 1)
#> [1] 0.1755898