Learn R Programming

lmom (version 3.2)

cdfexp: Exponential distribution

Description

Distribution function and quantile function of the exponential distribution.

Usage

cdfexp(x, para = c(0, 1))
quaexp(f, para = c(0, 1))

Value

cdfexp gives the distribution function;

quaexp gives the quantile function.

Arguments

x

Vector of quantiles.

f

Vector of probabilities.

para

Numeric vector containing the parameters of the distribution, in the order \(\xi, \alpha\) (location, scale).

Details

The exponential distribution with parameters \(\xi\) (lower bound) and \(\alpha\) (mean) has distribution function $$F(x)=1-\exp\lbrace-(x-\xi)/\alpha\rbrace$$ for \(x\ge0\), and quantile function $$x(F)=\xi-\alpha\log(1-F).$$

See Also

pexp for the standard R version of the exponential distribution. cdfgam for the gamma distribution, cdfgpa for the generalized Pareto distribution, cdfkap for the kappa distribution, cdfpe3 for the Pearson type III distribution, and cdfwak for the Wakeby distribution, all of which generalize the exponential distribution.

Examples

Run this code
# Random sample from the exponential distribution
# with lower bound 0 and mean 3.
quaexp(runif(100), c(0,3))

Run the code above in your browser using DataLab