SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.probdist.FisherFDist Class Reference

Extends the class ContinuousDistribution for the Fisher F distribution with \(n_1\) and \(n_2\) degrees of freedom, where. More...

Inheritance diagram for umontreal.ssj.probdist.FisherFDist:
umontreal.ssj.probdist.ContinuousDistribution umontreal.ssj.probdist.Distribution

Public Member Functions

 FisherFDist (int n1, int n2)
 Constructs a Fisher \(F\) distribution with n1 and n2 degrees of freedom.
double density (double x)
 Returns \(f(x)\), the density evaluated at \(x\).
double cdf (double x)
 Returns the distribution function \(F(x)\).
double barF (double x)
 Returns the complementary distribution function.
double inverseF (double u)
 Returns the inverse distribution function \(x = F^{-1}(u)\).
double getMean ()
 Returns the mean.
double getVariance ()
 Returns the variance.
double getStandardDeviation ()
 Returns the standard deviation.
int getN1 ()
 Returns the parameter n1 of this object.
int getN2 ()
 Returns the parameter n2 of this object.
void setParams (int n1, int n2)
 Sets the parameters n1 and n2 of this object.
double[] getParams ()
 Return a table containing the parameters of the current distribution.
String toString ()
 Returns a String containing information about the current distribution.
Public Member Functions inherited from umontreal.ssj.probdist.ContinuousDistribution
double inverseBrent (double a, double b, double u, double tol)
 Computes the inverse distribution function \(x = F^{-1}(u)\), using the Brent-Dekker method.
double inverseBisection (double u)
 Computes and returns the inverse distribution function \(x = F^{-1}(u)\), using bisection.
double getXinf ()
 Returns \(x_a\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
double getXsup ()
 Returns \(x_b\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
void setXinf (double xa)
 Sets the value \(x_a=\) xa, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
void setXsup (double xb)
 Sets the value \(x_b=\) xb, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).

Static Public Member Functions

static double density (int n1, int n2, double x)
 Computes the density function ( FisherF ) for a Fisher \(F\) distribution with n1 and n2 degrees of freedom, evaluated at \(x\).
static double cdf (int n1, int n2, int d, double x)
 Computes the distribution function of the Fisher \(F\) distribution with parameters n1 and n2, evaluated at \(x\), with roughly \(d\) decimal digits of precision.
static double cdf (int n1, int n2, double x)
 Computes the distribution function of the Fisher \(F\) distribution with parameters n1 and n2, evaluated at \(x\).
static double barF (int n1, int n2, int d, double x)
 Computes the complementary distribution function of the Fisher.
static double barF (int n1, int n2, double x)
 Computes the complementary distribution function of the Fisher.
static double inverseF (int n1, int n2, int d, double u)
 Computes the inverse of the Fisher \(F\) distribution with parameters n1 and n2, evaluated at \(u\), with roughly \(d\) decimal digits of precision.
static double inverseF (int n1, int n2, double u)
 Computes the inverse of the Fisher \(F\) distribution with parameters n1 and n2, evaluated at \(u\).
static double getMean (int n1, int n2)
 Computes and returns the mean \(E[X] = n_2 / (n_2 - 2)\) of the Fisher \(F\) distribution with parameters n1 and n2.
static double getVariance (int n1, int n2)
 Computes and returns the variance.
static double getStandardDeviation (int n1, int n2)
 Computes and returns the standard deviation of the Fisher \(F\) distribution with parameters n1 and n2.

Detailed Description

Extends the class ContinuousDistribution for the Fisher F distribution with \(n_1\) and \(n_2\) degrees of freedom, where.

\(n_1\) and \(n_2\) are positive integers. Its density is

\[ f(x) = \frac{\Gamma(\frac{n_1 + n_2}{2})n_1^{\frac{n_1}{2}}n_2^{\frac{n_2}{2}}}{\Gamma(\frac{n_1}{2})\Gamma(\frac{n_2}{2})} \frac{x^{\frac{n_1 - 2}{2}}}{(n_2 + n_1x)^{\frac{n_1 + n_2}{2}}}, \qquad\mbox{for } x > 0 \tag{FisherF} \]

where \(\Gamma(x)\) is the gamma function defined in ( Gamma ).

Definition at line 47 of file FisherFDist.java.

Constructor & Destructor Documentation

◆ FisherFDist()

umontreal.ssj.probdist.FisherFDist.FisherFDist ( int n1,
int n2 )

Constructs a Fisher \(F\) distribution with n1 and n2 degrees of freedom.

Definition at line 57 of file FisherFDist.java.

Member Function Documentation

◆ barF() [1/3]

double umontreal.ssj.probdist.FisherFDist.barF ( double x)

Returns the complementary distribution function.

The default implementation computes \(\bar{F}(x) = 1 - F(x)\).

Parameters
xvalue at which the complementary distribution function is evaluated
Returns
complementary distribution function evaluated at x

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 71 of file FisherFDist.java.

◆ barF() [2/3]

double umontreal.ssj.probdist.FisherFDist.barF ( int n1,
int n2,
double x )
static

Computes the complementary distribution function of the Fisher.

\(F\) distribution with parameters n1 and n2, evaluated at \(x\).

Definition at line 154 of file FisherFDist.java.

◆ barF() [3/3]

double umontreal.ssj.probdist.FisherFDist.barF ( int n1,
int n2,
int d,
double x )
static

Computes the complementary distribution function of the Fisher.

\(F\) distribution with parameters n1 and n2, evaluated at \(x\), with roughly \(d\) decimal digits of precision.

Definition at line 139 of file FisherFDist.java.

◆ cdf() [1/3]

double umontreal.ssj.probdist.FisherFDist.cdf ( double x)

Returns the distribution function \(F(x)\).

Parameters
xvalue at which the distribution function is evaluated
Returns
distribution function evaluated at x

Implements umontreal.ssj.probdist.Distribution.

Definition at line 67 of file FisherFDist.java.

◆ cdf() [2/3]

double umontreal.ssj.probdist.FisherFDist.cdf ( int n1,
int n2,
double x )
static

Computes the distribution function of the Fisher \(F\) distribution with parameters n1 and n2, evaluated at \(x\).

Definition at line 128 of file FisherFDist.java.

◆ cdf() [3/3]

double umontreal.ssj.probdist.FisherFDist.cdf ( int n1,
int n2,
int d,
double x )
static

Computes the distribution function of the Fisher \(F\) distribution with parameters n1 and n2, evaluated at \(x\), with roughly \(d\) decimal digits of precision.

Definition at line 114 of file FisherFDist.java.

◆ density() [1/2]

double umontreal.ssj.probdist.FisherFDist.density ( double x)

Returns \(f(x)\), the density evaluated at \(x\).

Parameters
xvalue at which the density is evaluated
Returns
density function evaluated at x

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 61 of file FisherFDist.java.

◆ density() [2/2]

double umontreal.ssj.probdist.FisherFDist.density ( int n1,
int n2,
double x )
static

Computes the density function ( FisherF ) for a Fisher \(F\) distribution with n1 and n2 degrees of freedom, evaluated at \(x\).

Definition at line 96 of file FisherFDist.java.

◆ getMean() [1/2]

double umontreal.ssj.probdist.FisherFDist.getMean ( )

Returns the mean.

Returns
the mean

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 79 of file FisherFDist.java.

◆ getMean() [2/2]

double umontreal.ssj.probdist.FisherFDist.getMean ( int n1,
int n2 )
static

Computes and returns the mean \(E[X] = n_2 / (n_2 - 2)\) of the Fisher \(F\) distribution with parameters n1 and n2.

\(=n_2\).

Returns
the mean of the Fisher \(F\) distribution

Definition at line 194 of file FisherFDist.java.

◆ getN1()

int umontreal.ssj.probdist.FisherFDist.getN1 ( )

Returns the parameter n1 of this object.

Definition at line 233 of file FisherFDist.java.

◆ getN2()

int umontreal.ssj.probdist.FisherFDist.getN2 ( )

Returns the parameter n2 of this object.

Definition at line 240 of file FisherFDist.java.

◆ getParams()

double[] umontreal.ssj.probdist.FisherFDist.getParams ( )

Return a table containing the parameters of the current distribution.

This table is put in regular order: [n1, n2].

Implements umontreal.ssj.probdist.Distribution.

Definition at line 263 of file FisherFDist.java.

◆ getStandardDeviation() [1/2]

double umontreal.ssj.probdist.FisherFDist.getStandardDeviation ( )

Returns the standard deviation.

Returns
the standard deviation

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 87 of file FisherFDist.java.

◆ getStandardDeviation() [2/2]

double umontreal.ssj.probdist.FisherFDist.getStandardDeviation ( int n1,
int n2 )
static

Computes and returns the standard deviation of the Fisher \(F\) distribution with parameters n1 and n2.

Returns
the standard deviation of the Fisher \(F\) distribution

Definition at line 226 of file FisherFDist.java.

◆ getVariance() [1/2]

double umontreal.ssj.probdist.FisherFDist.getVariance ( )

Returns the variance.

Returns
the variance

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 83 of file FisherFDist.java.

◆ getVariance() [2/2]

double umontreal.ssj.probdist.FisherFDist.getVariance ( int n1,
int n2 )
static

Computes and returns the variance.

\[ \mbox{Var}[X] = \frac{2n_2^2 (n_2 + n_1 - 2)}{n_1 (n_2 - 2)^2 (n_2 - 4)} \]

of the Fisher \(F\) distribution with parameters n1 \(=n_1\) and n2 \(=n_2\).

Returns
the variance of the Fisher \(F\) distribution \(\mbox{Var}[X] = (2n2^2 (n2 + n1 - 2)) / (n1 (n2 - 2)^2 (n2 - 4))\)

Definition at line 211 of file FisherFDist.java.

◆ inverseF() [1/3]

double umontreal.ssj.probdist.FisherFDist.inverseF ( double u)

Returns the inverse distribution function \(x = F^{-1}(u)\).

Restrictions: \(u \in[0,1]\).

Parameters
uvalue at which the inverse distribution function is evaluated
Returns
the inverse distribution function evaluated at u
Exceptions
IllegalArgumentExceptionif \(u\) is not in the interval \([0,1]\)

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 75 of file FisherFDist.java.

◆ inverseF() [2/3]

double umontreal.ssj.probdist.FisherFDist.inverseF ( int n1,
int n2,
double u )
static

Computes the inverse of the Fisher \(F\) distribution with parameters n1 and n2, evaluated at \(u\).

Definition at line 184 of file FisherFDist.java.

◆ inverseF() [3/3]

double umontreal.ssj.probdist.FisherFDist.inverseF ( int n1,
int n2,
int d,
double u )
static

Computes the inverse of the Fisher \(F\) distribution with parameters n1 and n2, evaluated at \(u\), with roughly \(d\) decimal digits of precision.

Definition at line 164 of file FisherFDist.java.

◆ setParams()

void umontreal.ssj.probdist.FisherFDist.setParams ( int n1,
int n2 )

Sets the parameters n1 and n2 of this object.

Definition at line 247 of file FisherFDist.java.

◆ toString()

String umontreal.ssj.probdist.FisherFDist.toString ( )

Returns a String containing information about the current distribution.

Definition at line 271 of file FisherFDist.java.


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