SSJ
V. 1.2.5.

umontreal.iro.lecuyer.gof
Class FBar

java.lang.Object
  extended by umontreal.iro.lecuyer.gof.FBar

public class FBar
extends Object

This class is similar to FDist, except that it provides static methods to compute or approximate the complementary distribution function of X, which we define as bar(F)(x) = P[X >= x], instead of F(x) = P[X <= x]. Note that with our definition of bar(F), one has bar(F)(x) = 1 - F(x) for continuous distributions and bar(F)(x) = 1 - F(x - 1) for discrete distributions over the integers. This is non-standard but we find it convenient.

For more details about the specific distributions, see the class FDist. When F(x) is very close to 1, these methods generally provide much more precise values of bar(F)(x) than using 1 - F(x) where F(x) is computed by a method from FDist.


Method Summary
static double andersonDarling(int n, double x)
          Returns 1.0 - FDist.andersonDarling (n, x).
static double cramerVonMises(int n, double x)
          Returns 1.0 - FDist.cramerVonMises (n, x).
static double kolmogorovSmirnov(int n, double x)
          Returns 1.0 - FDist.kolmogorovSmirnov (n, x).
static double kolmogorovSmirnovPlus(int n, double x)
          Returns 1.0 - FDist.kolmogorovSmirnovPlus (n, x).
static double scan(int n, double d, int m)
          Return P[SN(d ) >= m], where SN(d ) is the scan statistic.
static double watsonG(int n, double x)
          Returns 1.0 - FDist.watsonG (n, x).
static double watsonU(int n, double x)
          Returns 1.0 - FDist.watsonU (n, x).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

kolmogorovSmirnov

public static double kolmogorovSmirnov(int n,
                                       double x)
Returns 1.0 - FDist.kolmogorovSmirnov (n, x).

Parameters:
n - sample size
x - Kolmogorov-Smirnov statistic
Returns:
the complementary distribution function of the statistic evaluated at x

kolmogorovSmirnovPlus

public static double kolmogorovSmirnovPlus(int n,
                                           double x)
Returns 1.0 - FDist.kolmogorovSmirnovPlus (n, x).

Parameters:
n - sample size
x - Kolmogorov-Smirnov statistic
Returns:
the complementary distribution function of the statistic evaluated at x

cramerVonMises

public static double cramerVonMises(int n,
                                    double x)
Returns 1.0 - FDist.cramerVonMises (n, x).

Parameters:
n - sample size
x - Cramér-von Mises statistic
Returns:
the complementary distribution function of the statistic evaluated at x

watsonU

public static double watsonU(int n,
                             double x)
Returns 1.0 - FDist.watsonU (n, x).

Parameters:
n - sample size
x - Watson statistic
Returns:
the complementary distribution function of the statistic evaluated at x

watsonG

public static double watsonG(int n,
                             double x)
Returns 1.0 - FDist.watsonG (n, x).

Parameters:
n - sample size
x - Watson statistic
Returns:
the complementary distribution function of the statistic evaluated at x

andersonDarling

public static double andersonDarling(int n,
                                     double x)
Returns 1.0 - FDist.andersonDarling (n, x).

Parameters:
n - sample size
x - Anderson-Darling statistic
Returns:
the complementary distribution function of the statistic evaluated at x

scan

public static double scan(int n,
                          double d,
                          int m)
Return P[SN(d ) >= m], where SN(d ) is the scan statistic. It is defined as

SN(d )= sup0 <= y <= 1-dη[yy + d],

where d is a constant in (0, 1), η[yy + d] is the number of observations falling inside the interval [y, y + d], from a sample of N i.i.d. U(0, 1) random variables. The approximation returned by this function is generally good when it is close to 0, but is not very reliable when it exceeds, say, 0.4. Restrictions: N >= 2 and d <= 1/2.

Parameters:
n - sample size ( >= 2)
d - length of the test interval (∈(0, 1))
m - scan statistic
Returns:
the complementary distribution function of the statistic evaluated at m

SSJ
V. 1.2.5.

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