SSJ
V. 1.2.5.

umontreal.iro.lecuyer.probdist
Class FisherFDist

java.lang.Object
  extended by umontreal.iro.lecuyer.probdist.ContinuousDistribution
      extended by umontreal.iro.lecuyer.probdist.FisherFDist
All Implemented Interfaces:
Distribution

public class FisherFDist
extends ContinuousDistribution

Extends the class ContinuousDistribution for the Fisher F-distribution with n and m degrees of freedom, where n and m are positive integers. Its density is

f (x) = Γ((n + m)/2)nn/2mm/2/[Γ(n/2)Γ(m/2)]x(n-2)/2/(m + nx)(n+m)/2,         for x > 0.

where Γ(x) is the gamma function defined in GammaDist.

The non-static versions of the methods cdf, barF, and inverseF call the static version of the same name.


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
decPrec
 
Constructor Summary
FisherFDist(int n, int m)
          Constructs a Fisher F-distribution with n and m degrees of freedom.
 
Method Summary
 double barF(double x)
          Returns bar(F)(x) = 1 - F(x).
static double barF(int n, int m, int d, double x)
          Computes the complementary distribution function of the Fisher F-distribution with parameters n and m, evaluated at x, with roughly d decimal digits of precision.
 double cdf(double x)
          Computes and returns the distribution function F(x).
static double cdf(int n, int m, int d, double x)
          Computes the distribution function of the Fisher F-distribution with parameters n and m, evaluated at x, with roughly d decimal digits of precision.
 double density(double x)
          Returns f (x), the density of X evaluated at x.
static double density(int n, int m, double x)
          Computes the density function for a Fisher F-distribution with n and m degrees of freedom.
 int getM()
          Returns the parameter m of this object.
 double getMean()
          Returns the mean of the distribution function.
static double getMean(int n, int m)
          Computes and returns the mean E[X] = m/(m - 2) of the Fisher F-distribution with parameters n and m.
 int getN()
          Returns the parameter n of this object.
 double getStandardDeviation()
          Returns the standard deviation of the distribution function.
static double getStandardDeviation(int n, int m)
          Computes and returns the standard deviation of the Fisher F-distribution with parameters n and m.
 double getVariance()
          Returns the variance of the distribution function.
static double getVariance(int n, int m)
          Computes and returns the variance of the Fisher F-distribution with parameters n and m.
 double inverseF(double u)
          Computes and returns the inverse distribution function F-1(u), defined in.
static double inverseF(int n, int m, int d, double u)
          Computes the inverse of the Fisher F-distribution with parameters n and m, evaluated at x, with roughly d decimal digits of precision.
 void setParams(int n, int m)
          Sets the parameters n and m of this object.
 
Methods inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
inverseBisection, inverseBrent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FisherFDist

public FisherFDist(int n,
                   int m)
Constructs a Fisher F-distribution with n and m degrees of freedom.

Method Detail

density

public double density(double x)
Description copied from class: ContinuousDistribution
Returns f (x), the density of X evaluated at x.

Specified by:
density in class ContinuousDistribution
Parameters:
x - value at which the density is evaluated
Returns:
density function evaluated at x

cdf

public double cdf(double x)
Description copied from interface: Distribution
Computes and returns the distribution function F(x).

Parameters:
x - value at which the distribution function is evaluated
Returns:
distribution function evaluated at x

barF

public double barF(double x)
Description copied from interface: Distribution
Returns bar(F)(x) = 1 - F(x).

Specified by:
barF in interface Distribution
Overrides:
barF in class ContinuousDistribution
Parameters:
x - value at which the complementary distribution function is evaluated
Returns:
complementary distribution function evaluated at x

inverseF

public double inverseF(double u)
Description copied from interface: Distribution
Computes and returns the inverse distribution function F-1(u), defined in.

Specified by:
inverseF in interface Distribution
Overrides:
inverseF in class ContinuousDistribution
Parameters:
u - value in the interval (0, 1) for which the inverse distribution function is evaluated
Returns:
the inverse distribution function evaluated at u

getMean

public double getMean()
Description copied from interface: Distribution
Returns the mean of the distribution function.


getVariance

public double getVariance()
Description copied from interface: Distribution
Returns the variance of the distribution function.


getStandardDeviation

public double getStandardDeviation()
Description copied from interface: Distribution
Returns the standard deviation of the distribution function.


density

public static double density(int n,
                             int m,
                             double x)
Computes the density function for a Fisher F-distribution with n and m degrees of freedom.


cdf

public static double cdf(int n,
                         int m,
                         int d,
                         double x)
Computes the distribution function of the Fisher F-distribution with parameters n and m, evaluated at x, with roughly d decimal digits of precision.


barF

public static double barF(int n,
                          int m,
                          int d,
                          double x)
Computes the complementary distribution function of the Fisher F-distribution with parameters n and m, evaluated at x, with roughly d decimal digits of precision.


inverseF

public static double inverseF(int n,
                              int m,
                              int d,
                              double u)
Computes the inverse of the Fisher F-distribution with parameters n and m, evaluated at x, with roughly d decimal digits of precision.


getMean

public static double getMean(int n,
                             int m)
Computes and returns the mean E[X] = m/(m - 2) of the Fisher F-distribution with parameters n and m.

Returns:
the mean of the Fisher F-distribution

getVariance

public static double getVariance(int n,
                                 int m)
Computes and returns the variance of the Fisher F-distribution with parameters n and m.

Returns:
the variance of the Fisher F-distribution Var[X] = (2m2(m + n - 2))/(n(m - 2)2(m - 4))

getStandardDeviation

public static double getStandardDeviation(int n,
                                          int m)
Computes and returns the standard deviation of the Fisher F-distribution with parameters n and m.

Returns:
the standard deviation of the Fisher F-distribution

getN

public int getN()
Returns the parameter n of this object.


getM

public int getM()
Returns the parameter m of this object.


setParams

public void setParams(int n,
                      int m)
Sets the parameters n and m of this object.


SSJ
V. 1.2.5.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.