![]() |
TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
Exponential Distribution More...
#include <cassert>#include <cmath>#include <iostream>#include <stdexcept>#include <string>Go to the source code of this file.
Namespaces | |
| namespace | probability |
| Probability algorithms. | |
| namespace | exponential_dist |
| Functions for the Exponential Distribution algorithm implementation. | |
Functions | |
| double | probability::geometric_dist::exponential_expected (double lambda) |
| the expected value of the exponential distribution | |
| double | probability::geometric_dist::exponential_var (double lambda) |
| the variance of the exponential distribution | |
| double | probability::geometric_dist::exponential_std (double lambda) |
| the standard deviation of the exponential distribution | |
| static void | test () |
| Self-test implementations. | |
| int | main () |
| Main function. | |
The exponential distribution is used to model events occuring between a Poisson process like radioactive decay.
\[P(x, \lambda) = \lambda e^{-\lambda x}\]
Summary of variables used: \(\lambda\) : rate parameter
Definition in file exponential_dist.cpp.
| double probability::geometric_dist::exponential_expected | ( | double | lambda | ) |
the expected value of the exponential distribution
\[\mu = \frac{1}{\lambda}\]
Definition at line 37 of file exponential_dist.cpp.
| double probability::geometric_dist::exponential_std | ( | double | lambda | ) |
the standard deviation of the exponential distribution
\[\sigma = \frac{1}{\lambda}\]
Definition at line 59 of file exponential_dist.cpp.
| double probability::geometric_dist::exponential_var | ( | double | lambda | ) |
the variance of the exponential distribution
\[\sigma^2 = \frac{1}{\lambda^2}\]
Definition at line 48 of file exponential_dist.cpp.
| int main | ( | void | ) |
Main function.
Definition at line 148 of file exponential_dist.cpp.
|
static |
Self-test implementations.
Definition at line 72 of file exponential_dist.cpp.