STK++ 0.9.13
STK::Law::FisherSnedecor Class Reference

FisherSnedecor distribution law. More...

#include <STK_Law_FisherSnedecor.h>

Inheritance diagram for STK::Law::FisherSnedecor:
Inheritance graph

Public Types

typedef IUnivLaw< RealBase
 

Public Member Functions

 FisherSnedecor (int df1=1., int df2=1)
 Default constructor.
 
virtual ~FisherSnedecor ()
 destructor
 
int df1 () const
 
int df2 () const
 
void setDf1 (int df1)
 
void setDf2 (int df2)
 
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
 
- Public Member Functions inherited from STK::Law::IUnivLaw< Real >
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.
 
- Public Member Functions inherited from STK::Law::ILawBase
String constname () const
 

Static Public Member Functions

static Real rand (int df1, int df2)
 
static Real pdf (Real const &x, int df1, int df2)
 
static Real lpdf (Real const &x, int df1, int df2)
 
static Real cdf (Real const &t, int df1, int df2)
 
static Real icdf (Real const &p, int df1, int df2)
 

Protected Attributes

int df1_
 First degree of freedom.
 
int df2_
 Second degree of freedom.
 
- Protected Attributes inherited from STK::Law::ILawBase
String name_
 Name of the Law.
 

Additional Inherited Members

- Protected Member Functions inherited from STK::Law::IUnivLaw< Real >
 IUnivLaw (String const &name)
 Constructor.
 
 IUnivLaw (IUnivLaw const &law)
 copy Constructor.
 
- Protected Member Functions inherited from STK::Law::ILawBase
 ILawBase (String const &name)
 Constructor.
 
 ~ILawBase ()
 destructor.
 

Detailed Description

FisherSnedecor distribution law.

In probability theory and statistics, the F-distribution is a continuous probability distribution. It is also known as Snedecor's F distribution or the Fisher–Snedecor distribution (after R. A. Fisher and George W. Snedecor). The F-distribution arises frequently as the null distribution of a test statistic, most notably in the analysis of variance.

If a random variable X has an F-distribution with parameters d1 and d2, we write $ X \sim F(d1, d2)$. Then the probability density function (pdf) for X is given by

\[
f(x; d_1,d_2) = \frac{\sqrt{\frac{(d_1\,x)^{d_1}\,\,d_2^{d_2}} {(d_1\,x+d_2)^{d_1+d_2}}}}
                {x\,\mathrm{B}\!\left(\frac{d_1}{2},\frac{d_2}{2}\right)}
\]

Definition at line 62 of file STK_Law_FisherSnedecor.h.

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ FisherSnedecor()

STK::Law::FisherSnedecor::FisherSnedecor ( int  df1 = 1.,
int  df2 = 1 
)
inline

Default constructor.

Parameters
df1,df2degree of freedom parameters

Definition at line 69 of file STK_Law_FisherSnedecor.h.

70 : Base(_T("Fisher-Snedecor")), df1_(df1), df2_(df2)
71 {};
#define _T(x)
Let x unmodified.
int df2_
Second degree of freedom.
int df1_
First degree of freedom.

◆ ~FisherSnedecor()

virtual STK::Law::FisherSnedecor::~FisherSnedecor ( )
inlinevirtual

destructor

Definition at line 73 of file STK_Law_FisherSnedecor.h.

73{}

Member Function Documentation

◆ cdf() [1/2]

Real STK::Law::FisherSnedecor::cdf ( Real const t) const
virtual
Returns
the cumulative distribution function
Parameters
ta positive real value

Implements STK::Law::IUnivLaw< Real >.

Definition at line 71 of file STK_Law_FisherSnedecor.cpp.

72{
73 return 0;
74}

◆ cdf() [2/2]

Real STK::Law::FisherSnedecor::cdf ( Real const t,
int  df1,
int  df2 
)
static
Returns
the cumulative distribution function
Parameters
ta positive real value
df1,df2degree of freedom parameters

Definition at line 110 of file STK_Law_FisherSnedecor.cpp.

111{
112 return 0;
113}

◆ df1()

int STK::Law::FisherSnedecor::df1 ( ) const
inline
Returns
first degree of freedom parameter

Definition at line 75 of file STK_Law_FisherSnedecor.h.

75{ return df1_;}

References df1_.

Referenced by setDf1().

◆ df2()

int STK::Law::FisherSnedecor::df2 ( ) const
inline
Returns
second degree of freedom parameter

Definition at line 77 of file STK_Law_FisherSnedecor.h.

77{ return df2_;}

References df2_.

Referenced by setDf2().

◆ icdf() [1/2]

Real STK::Law::FisherSnedecor::icdf ( Real const p) const
virtual
Returns
the inverse cumulative distribution function
Parameters
pa probability number

Implements STK::Law::IUnivLaw< Real >.

Definition at line 78 of file STK_Law_FisherSnedecor.cpp.

79{
80 return 0;
81}

◆ icdf() [2/2]

Real STK::Law::FisherSnedecor::icdf ( Real const p,
int  df1,
int  df2 
)
static
Returns
the inverse cumulative distribution function
Parameters
pa probability number
df1,df2degree of freedom parameters

Definition at line 119 of file STK_Law_FisherSnedecor.cpp.

120{
121 return 0;
122}

◆ lpdf() [1/2]

Real STK::Law::FisherSnedecor::lpdf ( Real const x) const
virtual
Returns
the value of the log-pdf
Parameters
xa positive real value

Reimplemented from STK::Law::IUnivLaw< Real >.

Definition at line 64 of file STK_Law_FisherSnedecor.cpp.

65{
66 return 0;
67}

◆ lpdf() [2/2]

Real STK::Law::FisherSnedecor::lpdf ( Real const x,
int  df1,
int  df2 
)
static
Returns
the value of the log-pdf
Parameters
xa positive real value
df1,df2degree of freedom parameters

Definition at line 102 of file STK_Law_FisherSnedecor.cpp.

103{
104 return 0;
105}

◆ pdf() [1/2]

Real STK::Law::FisherSnedecor::pdf ( Real const x) const
virtual
Returns
the value of the pdf
Parameters
xa positive real value

Implements STK::Law::IUnivLaw< Real >.

Definition at line 57 of file STK_Law_FisherSnedecor.cpp.

58{
59 return 0;
60}

◆ pdf() [2/2]

Real STK::Law::FisherSnedecor::pdf ( Real const x,
int  df1,
int  df2 
)
static
Returns
the value of the pdf
Parameters
xa positive real value
df1,df2degree of freedom parameters

Definition at line 94 of file STK_Law_FisherSnedecor.cpp.

95{
96 return 0;
97}

◆ rand() [1/2]

Real STK::Law::FisherSnedecor::rand ( ) const
virtual
Returns
a pseudo FisherSnedecor random variate.

Implements STK::Law::IUnivLaw< Real >.

Definition at line 50 of file STK_Law_FisherSnedecor.cpp.

51{
52 return 0;
53}

◆ rand() [2/2]

Real STK::Law::FisherSnedecor::rand ( int  df1,
int  df2 
)
static
Returns
a pseudo FisherSnedecor random variate with the specified parameters.
Parameters
df1,df2degree of freedom parameters

Definition at line 86 of file STK_Law_FisherSnedecor.cpp.

87{
88 return 0;
89}

◆ setDf1()

void STK::Law::FisherSnedecor::setDf1 ( int  df1)
inline
Parameters
df1set first degree of freedom parameter

Definition at line 79 of file STK_Law_FisherSnedecor.h.

80 {
81 if (df1<=0) STKDOMAIN_ERROR_1ARG(FisherSnedecor::setDf1,df1,degree of freedom must be > 0);
82 df1_ = df1;
83 }
#define STKDOMAIN_ERROR_1ARG(Where, Arg, Error)
Definition STK_Macros.h:165

References df1(), df1_, setDf1(), and STKDOMAIN_ERROR_1ARG.

Referenced by setDf1().

◆ setDf2()

void STK::Law::FisherSnedecor::setDf2 ( int  df2)
inline
Parameters
df2set second degree of freedom parameter

Definition at line 85 of file STK_Law_FisherSnedecor.h.

86 {
87 if (df2<=0) STKDOMAIN_ERROR_1ARG(FisherSnedecor::setDf2,df2,degree of freedom must be > 0);
88 df2_ = df2;
89 }

References df2(), df2_, setDf2(), and STKDOMAIN_ERROR_1ARG.

Referenced by setDf2().

Member Data Documentation

◆ df1_

int STK::Law::FisherSnedecor::df1_
protected

First degree of freedom.

Definition at line 145 of file STK_Law_FisherSnedecor.h.

Referenced by df1(), and setDf1().

◆ df2_

int STK::Law::FisherSnedecor::df2_
protected

Second degree of freedom.

Definition at line 147 of file STK_Law_FisherSnedecor.h.

Referenced by df2(), and setDf2().


The documentation for this class was generated from the following files: