# Exponential: Create an Exponential distribution In distributions3: Probability Distributions as S3 Objects

 Exponential R Documentation

## Create an Exponential distribution

### Description

Exponential distributions are frequently used for modeling the amount of time that passes until a specific event occurs. For example, exponential distributions could be used to model the time between two earthquakes, the amount of delay between internet packets, or the amount of time a piece of machinery can run before needing repair.

### Usage

Exponential(rate = 1)


### Arguments

 rate The rate parameter, written λ in textbooks. Can be any positive number. Defaults to 1.

### Details

We recommend reading this documentation on https://alexpghayes.github.io/distributions3/, where the math will render with additional detail and much greater clarity.

In the following, let X be an Exponential random variable with rate parameter rate = λ.

Support: x in [0, )

Mean: 1 / λ

Variance: 1 / λ^2

Probability density function (p.d.f):

f(x) = λ e^{-λ x}

Cumulative distribution function (c.d.f):

F(x) = 1 - e^{-λ x}

Moment generating function (m.g.f):

\frac{λ}{λ - t}, for t < λ

### Value

An Exponential object.

Other continuous distributions: Beta(), Cauchy(), ChiSquare(), Erlang(), FisherF(), Frechet(), GEV(), GP(), Gamma(), Gumbel(), LogNormal(), Logistic(), Normal(), RevWeibull(), StudentsT(), Tukey(), Uniform(), Weibull()

### Examples


set.seed(27)

X <- Exponential(5)
X

mean(X)
variance(X)
skewness(X)
kurtosis(X)

random(X, 10)

pdf(X, 2)
log_pdf(X, 2)

cdf(X, 4)
quantile(X, 0.7)

cdf(X, quantile(X, 0.7))
quantile(X, cdf(X, 7))


distributions3 documentation built on Sept. 7, 2022, 5:07 p.m.