SSJ
V. 2.6.2.

umontreal.iro.lecuyer.probdist
Class AndersonDarlingDistQuick

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

public class AndersonDarlingDistQuick
extends AndersonDarlingDist

Extends the class AndersonDarlingDist for the distribution (see). This class implements a version faster and more precise in the tails than class AndersonDarlingDist.


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
decPrec
 
Constructor Summary
AndersonDarlingDistQuick(int n)
          Constructs an distribution for a sample of size n.
 
Method Summary
 double barF(double x)
          Returns the complementary distribution function.
static double barF(int n, double x)
          Computes the complementary distribution function bar(F)n(x) with parameter n.
 double cdf(double x)
          Returns the distribution function F(x).
static double cdf(int n, double x)
          Computes the distribution function Fn(x) at x for sample size n.
 double density(double x)
          Returns f (x), the density evaluated at x.
static double density(int n, double x)
          Computes the density of the distribution with parameter n.
 double inverseF(double u)
          Returns the inverse distribution function x = F-1(u).
static double inverseF(int n, double u)
          Computes the inverse x = Fn-1(u) of the distribution with parameter n.
 String toString()
           
 
Methods inherited from class umontreal.iro.lecuyer.probdist.AndersonDarlingDist
getN, getParams, setN
 
Methods inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
getMean, getStandardDeviation, getVariance, getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsup
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AndersonDarlingDistQuick

public AndersonDarlingDistQuick(int n)
Constructs an distribution for a sample of size n.

Method Detail

density

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

Overrides:
density in class AndersonDarlingDist
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
Returns the distribution function F(x).

Specified by:
cdf in interface Distribution
Overrides:
cdf in class AndersonDarlingDist
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 class: ContinuousDistribution
Returns the complementary distribution function. The default implementation computes bar(F)(x) = 1 - F(x).

Specified by:
barF in interface Distribution
Overrides:
barF in class AndersonDarlingDist
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 class: ContinuousDistribution
Returns the inverse distribution function x = F-1(u). Restrictions: u∈[0, 1].

Specified by:
inverseF in interface Distribution
Overrides:
inverseF in class AndersonDarlingDist
Parameters:
u - value at which the inverse distribution function is evaluated
Returns:
the inverse distribution function evaluated at u

density

public static double density(int n,
                             double x)
Computes the density of the distribution with parameter n.


cdf

public static double cdf(int n,
                         double x)
Computes the distribution function Fn(x) at x for sample size n. For 0.2 < x < 5, the asymptotic distribution F(x) = limn -> ∞Fn(x) was first computed by numerical integration; then a linear correction O(1/n) obtained by simulation was added. For 5 < x, the Grace-Wood empirical approximation is used. For x < 0.2, the Marsaglias' approximation for n = ∞ is used.

For n > 6, the method gives at least 3 decimal digits of precision except for small x; for n <= 6, it gives at least 2 decimal digits of precision except for small x. For n = 1, the exact formula F1(x) = (1 - 4e^-x-1)1/2, for x >= ln(4) - 1, is used.


barF

public static double barF(int n,
                          double x)
Computes the complementary distribution function bar(F)n(x) with parameter n.


inverseF

public static double inverseF(int n,
                              double u)
Computes the inverse x = Fn-1(u) of the distribution with parameter n.


toString

public String toString()
Overrides:
toString in class AndersonDarlingDist

SSJ
V. 2.6.2.

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