1 [section:exp_dist Exponential Distribution]
3 ``#include <boost/math/distributions/exponential.hpp>``
5 template <class RealType = double,
6 class ``__Policy`` = ``__policy_class`` >
7 class exponential_distribution;
9 typedef exponential_distribution<> exponential;
11 template <class RealType, class ``__Policy``>
12 class exponential_distribution
15 typedef RealType value_type;
16 typedef Policy policy_type;
18 exponential_distribution(RealType lambda = 1);
20 RealType lambda()const;
24 The [@http://en.wikipedia.org/wiki/Exponential_distribution exponential distribution]
25 is a [@http://en.wikipedia.org/wiki/Probability_distribution continuous probability distribution]
28 [equation exponential_dist_ref1]
30 It is often used to model the time between independent
31 events that happen at a constant average rate.
33 The following graph shows how the distribution changes for different
34 values of the rate parameter lambda:
36 [graph exponential_pdf]
40 exponential_distribution(RealType lambda = 1);
43 [@http://en.wikipedia.org/wiki/Exponential_distribution Exponential distribution]
44 with parameter /lambda/.
45 Lambda is defined as the reciprocal of the scale parameter.
47 Requires lambda > 0, otherwise calls __domain_error.
49 RealType lambda()const;
51 Accessor function returns the lambda parameter of the distribution.
53 [h4 Non-member Accessors]
55 All the [link math_toolkit.dist.dist_ref.nmp usual non-member accessor functions]
56 that are generic to all distributions are supported: __usual_accessors.
58 The domain of the random variable is \[0, +[infin]\].
62 The exponential distribution is implemented in terms of the
63 standard library functions `exp`, `log`, `log1p` and `expm1`
64 and as such should have very low error rates.
68 In the following table [lambda] is the parameter lambda of the distribution,
69 /x/ is the random variate, /p/ is the probability and /q = 1-p/.
72 [[Function][Implementation Notes]]
73 [[pdf][Using the relation: pdf = [lambda] * exp(-[lambda] * x) ]]
74 [[cdf][Using the relation: p = 1 - exp(-x * [lambda]) = -expm1(-x * [lambda]) ]]
75 [[cdf complement][Using the relation: q = exp(-x * [lambda]) ]]
76 [[quantile][Using the relation: x = -log(1-p) / [lambda] = -log1p(-p) / [lambda]]]
77 [[quantile from the complement][Using the relation: x = -log(q) / [lambda]]]
79 [[standard deviation][1/[lambda]]]
83 [[kurtosis excess][6]]
88 * [@http://mathworld.wolfram.com/ExponentialDistribution.html Weisstein, Eric W. "Exponential Distribution." From MathWorld--A Wolfram Web Resource]
89 * [@http://documents.wolfram.com/calccenter/Functions/ListsMatrices/Statistics/ExponentialDistribution.html Wolfram Mathematica calculator]
90 * [@http://www.itl.nist.gov/div898/handbook/eda/section3/eda3667.htm NIST Exploratory Data Analysis]
91 * [@http://en.wikipedia.org/wiki/Exponential_distribution Wikipedia Exponential distribution]
93 (See also the reference documentation for the related __extreme_distrib.)
96 [@http://www.worldscibooks.com/mathematics/p191.html Extreme Value Distributions, Theory and Applications
97 Samuel Kotz & Saralees Nadarajah]
98 discuss the relationship of the types of extreme value distributions.
100 [endsect][/section:exp_dist Exponential]
103 Copyright 2006 John Maddock and Paul A. Bristow.
104 Distributed under the Boost Software License, Version 1.0.
105 (See accompanying file LICENSE_1_0.txt or copy at
106 http://www.boost.org/LICENSE_1_0.txt).