Learn R Programming

boostmath (version 1.0.0)

exponential_distribution: Exponential Distribution Functions

Description

Functions to compute the probability density function, cumulative distribution function, and quantile function for the Exponential distribution.

Usage

exponential_pdf(x, lambda)

exponential_lpdf(x, lambda)

exponential_cdf(x, lambda)

exponential_lcdf(x, lambda)

exponential_quantile(p, lambda)

Value

A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.

Arguments

x

quantile

lambda

rate parameter (lambda > 0)

p

probability (0 <= p <= 1)

See Also

Boost Documentation for more details on the mathematical background.

Examples

Run this code
# Exponential distribution with rate parameter lambda = 2
exponential_pdf(1, 2)
exponential_lpdf(1, 2)
exponential_cdf(1, 2)
exponential_lcdf(1, 2)
exponential_quantile(0.5, 2)

Run the code above in your browser using DataLab