STK++ 0.9.13
|
Poisson distribution law. More...
#include <STK_Law_Poisson.h>
Public Types | |
typedef IUnivLaw< int > | Base |
Public Member Functions | |
Poisson (Real const &lambda=1.) | |
constructor | |
virtual | ~Poisson () |
destructor | |
Real const & | lambda () const |
void | setLambda (Real const &lambda) |
virtual int | rand () const |
virtual Real | pdf (int const &x) const |
compute the probability distribution function. | |
virtual Real | lpdf (int const &x) const |
compute the log probability distribution function. | |
virtual Real | cdf (Real const &t) const |
compute the cumulative distribution function Give the probability that a Poisson random variate is less or equal to t. | |
virtual int | icdf (Real const &p) const |
inverse cumulative distribution function The quantile is defined as the smallest value q such that F(q) >= p , where F is the cumulative distribution function. | |
![]() | |
virtual | ~IUnivLaw () |
Virtual destructor. | |
virtual Real | lcdf (Real const &t) const |
compute the lower tail log-cumulative distribution function Give the log-probability that a random variate is less or equal to t. | |
virtual Real | cdfc (Real const &t) const |
calculate the complement of cumulative distribution function, called in statistics the survival function. | |
virtual Real | lcdfc (Real const &t) const |
calculate the log-complement of cumulative distribution function Give the log-probability that a random variate is greater than t. | |
![]() | |
String const & | name () const |
Static Public Member Functions | |
static int | rand (Real const &lambda) |
static Real | pdf (int const &x, Real const &lambda) |
compute the probability distribution function Give the value of the pdf at the point x. | |
static Real | lpdf (int const &x, Real const &lambda) |
compute the log probability distribution function Give the value of the log-pdf at the point x. | |
static Real | cdf (Real const &t, Real const &lambda) |
compute the cumulative distribution function Give the probability that a Poisson random variate is less or equal to t. | |
static int | icdf (Real const &p, Real const &lambda) |
inverse cumulative distribution function The quantile is defined as the smallest value x such that F(x) >= p , where F is the cumulative distribution function. | |
Protected Attributes | |
Real | lambda_ |
mean of the Poisson distribution | |
![]() | |
String | name_ |
Name of the Law. | |
Additional Inherited Members | |
![]() | |
IUnivLaw (String const &name) | |
Constructor. | |
IUnivLaw (IUnivLaw const &law) | |
copy Constructor. | |
![]() | |
ILawBase (String const &name) | |
Constructor. | |
~ILawBase () | |
destructor. | |
Poisson distribution law.
In probability theory and statistics, the Poisson distribution, named after French mathematician Siméon Denis Poisson, is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time and/or space if these events occur with a known average rate and independently of the time since the last event.
The Poisson distribution can be applied to systems with a large number of possible events, each of which is rare. How many such events will occur during a fixed time interval? Under the right circumstances, this is a random number with a Poisson distribution.
A discrete random variable X is said to have a Poisson distribution with parameter
The positive real number
Definition at line 69 of file STK_Law_Poisson.h.
Definition at line 72 of file STK_Law_Poisson.h.
constructor
lambda | mean of a Poisson distribution |
Definition at line 76 of file STK_Law_Poisson.h.
|
inlinevirtual |
compute the cumulative distribution function Give the probability that a Poisson random variate is less or equal to t.
t | a real value |
Implements STK::Law::IUnivLaw< int >.
Definition at line 202 of file STK_Law_Poisson.cpp.
References STK::Funct::gammaRatioQ(), and lambda_.
compute the cumulative distribution function Give the probability that a Poisson random variate is less or equal to t.
t | a real value |
lambda | the mean |
Definition at line 297 of file STK_Law_Poisson.cpp.
References STK::Funct::gammaRatioQ(), and lambda().
inverse cumulative distribution function The quantile is defined as the smallest value q such that F(q) >= p , where F is the cumulative distribution function.
p | a probability number |
Implements STK::Law::IUnivLaw< int >.
Definition at line 215 of file STK_Law_Poisson.cpp.
inverse cumulative distribution function The quantile is defined as the smallest value x such that F(x) >= p , where F is the cumulative distribution function.
p | a probability number |
lambda | the mean |
Definition at line 310 of file STK_Law_Poisson.cpp.
Definition at line 81 of file STK_Law_Poisson.h.
References lambda_.
Referenced by cdf(), icdf(), lpdf(), pdf(), rand(), and setLambda().
compute the log probability distribution function.
Give the value of the log-pdf at the point x.
x | an integer value |
Reimplemented from STK::Law::IUnivLaw< int >.
Definition at line 183 of file STK_Law_Poisson.cpp.
References STK::Funct::dev0(), lambda_, and STK::Funct::lgammaStirlingError().
Referenced by STK::PoissonBase< Derived >::lnComponentProbability().
compute the log probability distribution function Give the value of the log-pdf at the point x.
x | a binary value |
lambda | the mean |
Definition at line 277 of file STK_Law_Poisson.cpp.
References STK::Funct::dev0(), lambda(), and STK::Funct::lgammaStirlingError().
compute the probability distribution function.
Give the value of the pdf at the point x.
x | a binary value |
Implements STK::Law::IUnivLaw< int >.
Definition at line 164 of file STK_Law_Poisson.cpp.
References STK::Funct::dev0(), lambda_, and STK::Funct::lgammaStirlingError().
compute the probability distribution function Give the value of the pdf at the point x.
x | a binary value |
lambda | the mean |
Definition at line 257 of file STK_Law_Poisson.cpp.
References STK::Funct::dev0(), lambda(), and STK::Funct::lgammaStirlingError().
|
virtual |
Implements STK::Law::IUnivLaw< int >.
Definition at line 155 of file STK_Law_Poisson.cpp.
References lambda_.
Referenced by STK::PoissonBase< Derived >::rand().
lambda | the mean |
Definition at line 249 of file STK_Law_Poisson.cpp.
References lambda().
lambda | mean to set |
Definition at line 83 of file STK_Law_Poisson.h.
References lambda(), lambda_, setLambda(), and STKDOMAIN_ERROR_1ARG.
Referenced by setLambda().
|
protected |
mean of the Poisson distribution
Definition at line 165 of file STK_Law_Poisson.h.
Referenced by cdf(), icdf(), lambda(), lpdf(), pdf(), rand(), and setLambda().