STK++ 0.9.13
|
Beta distribution law. More...
#include <STK_Law_Beta.h>
Public Types | |
typedef IUnivLaw< Real > | Base |
Public Member Functions | |
Beta (Real const &alpha=.5, Real const &beta=.5) | |
default constructor. | |
virtual | ~Beta () |
Dtor. | |
Real | alpha () const |
Real | beta () const |
void | setAlpha (Real alpha) |
set the alpha value | |
void | setBeta (Real beta) |
set the beta value | |
virtual Real | rand () const |
virtual Real | pdf (Real const &x) const |
virtual Real | lpdf (Real const &x) const |
virtual Real | cdf (Real const &t) const |
virtual Real | icdf (Real const &p) const |
![]() | |
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 Real | rand (Real const &alpha, Real const &beta) |
static Real | pdf (Real const &x, Real const &alpha, Real const &beta) |
static Real | lpdf (Real const &x, Real const &alpha, Real const &beta) |
static Real | cdf (Real const &t, Real const &alpha, Real const &beta) |
static Real | icdf (Real const &p, Real const &alpha, Real const &beta) |
Protected Attributes | |
Real | alpha_ |
First parameter. | |
Real | beta_ |
Second parameter. | |
![]() | |
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. | |
Beta distribution law.
In probability theory and statistics, the beta distribution is a family of continuous probability distributions defined on the interval [0, 1] parameterized by two positive shape parameters that appear as exponents of the random variable and control the shape of the distribution.
The Beta distribution, is a continuous probability distribution with pdf
where
Definition at line 64 of file STK_Law_Beta.h.
Definition at line 67 of file STK_Law_Beta.h.
default constructor.
Definition at line 69 of file STK_Law_Beta.h.
References alpha(), beta(), STK::isFinite(), and STKDOMAIN_ERROR_2ARG.
|
inlinevirtual |
|
inline |
Definition at line 78 of file STK_Law_Beta.h.
References alpha_.
Referenced by Beta(), cdf(), rand(), and setAlpha().
|
inline |
Implements STK::Law::IUnivLaw< Real >.
Definition at line 85 of file STK_Law_Beta.cpp.
References alpha_, beta_, STK::Funct::betaRatio(), STK::isNA(), and STK::Arithmetic< Type >::NA().
Definition at line 137 of file STK_Law_Beta.cpp.
References alpha(), beta(), STK::Funct::betaRatio(), STK::isNA(), and STK::Arithmetic< Type >::NA().
Implements STK::Law::IUnivLaw< Real >.
Definition at line 97 of file STK_Law_Beta.cpp.
References icdf(), and STKDOMAIN_ERROR_1ARG.
Definition at line 146 of file STK_Law_Beta.cpp.
References icdf(), and STKDOMAIN_ERROR_1ARG.
Reimplemented from STK::Law::IUnivLaw< Real >.
Definition at line 71 of file STK_Law_Beta.cpp.
References STK::isNA(), and STK::Arithmetic< Type >::NA().
Definition at line 126 of file STK_Law_Beta.cpp.
References STK::isNA(), and STK::Arithmetic< Type >::NA().
Implements STK::Law::IUnivLaw< Real >.
Definition at line 60 of file STK_Law_Beta.cpp.
Definition at line 118 of file STK_Law_Beta.cpp.
|
virtual |
Implements STK::Law::IUnivLaw< Real >.
Definition at line 51 of file STK_Law_Beta.cpp.
References alpha_, beta_, and STK::Law::Gamma::rand().
Definition at line 112 of file STK_Law_Beta.cpp.
References alpha(), beta(), and STK::Law::Gamma::rand().
|
protected |
First parameter.
Definition at line 127 of file STK_Law_Beta.h.
Referenced by alpha(), cdf(), rand(), and setAlpha().
|
protected |