View source: R/dist_exponential.R
| dist_exponential | R Documentation |
Exponential distributions are frequently used to model waiting times and the time between events in a Poisson process.
dist_exponential(rate)
rate |
vector of rates. |
We recommend reading this documentation on pkgdown which renders math nicely. https://pkg.mitchelloharawild.com/distributional/reference/dist_exponential.html
In the following, let X be an Exponential random variable with
parameter rate = \lambda.
Support: x \in [0, \infty)
Mean: \frac{1}{\lambda}
Variance: \frac{1}{\lambda^2}
Probability density function (p.d.f):
f(x) = \lambda e^{-\lambda x}
Cumulative distribution function (c.d.f):
F(x) = 1 - e^{-\lambda x}
Moment generating function (m.g.f):
E(e^{tX}) = \frac{\lambda}{\lambda - t}, \quad t < \lambda
stats::Exponential
dist <- dist_exponential(rate = c(2, 1, 2/3))
dist
mean(dist)
variance(dist)
skewness(dist)
kurtosis(dist)
generate(dist, 10)
density(dist, 2)
density(dist, 2, log = TRUE)
cdf(dist, 4)
quantile(dist, 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.