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

Extends the class AndersonDarlingDist for the Anderson–Darling distribution (see [6], [161], [216] ). More...

Inheritance diagram for umontreal.ssj.probdist.AndersonDarlingDistQuick:
umontreal.ssj.probdist.AndersonDarlingDist umontreal.ssj.probdist.ContinuousDistribution umontreal.ssj.probdist.Distribution

Public Member Functions

 AndersonDarlingDistQuick (int n)
 Constructs an Anderson–Darling distribution for a sample of size \(n\).
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)\).
String toString ()
 Returns a String containing information about the current distribution.
Public Member Functions inherited from umontreal.ssj.probdist.AndersonDarlingDist
 AndersonDarlingDist (int n)
 Constructs an Anderson–Darling distribution for a sample of size \(n\).
int getN ()
 Returns the parameter \(n\) of this object.
void setN (int n)
 Sets the parameter \(n\) of this object.
double[] getParams ()
 Return an array containing the parameter \(n\) of 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 getMean ()
 Returns the mean.
double getVariance ()
 Returns the variance.
double getStandardDeviation ()
 Returns the standard deviation.
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 n, double x)
 Computes the density of the Anderson–Darling distribution with parameter \(n\).
static double cdf (int n, double x)
 Computes the Anderson–Darling distribution function \(F_n(x)\) at.
static double barF (int n, double x)
 Computes the complementary distribution function \(\bar{F}_n(x)\) with parameter \(n\).
static double inverseF (int n, double u)
 Computes the inverse \(x = F_n^{-1}(u)\) of the Anderson–Darling distribution with parameter \(n\).

Detailed Description

Extends the class AndersonDarlingDist for the Anderson–Darling distribution (see [6], [161], [216] ).

This class implements a version faster and more precise in the tails than class AndersonDarlingDist.

Definition at line 40 of file AndersonDarlingDistQuick.java.

Constructor & Destructor Documentation

◆ AndersonDarlingDistQuick()

umontreal.ssj.probdist.AndersonDarlingDistQuick.AndersonDarlingDistQuick ( int n)

Constructs an Anderson–Darling distribution for a sample of size \(n\).

Definition at line 73 of file AndersonDarlingDistQuick.java.

Member Function Documentation

◆ barF() [1/2]

double umontreal.ssj.probdist.AndersonDarlingDistQuick.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.AndersonDarlingDist.

Definition at line 85 of file AndersonDarlingDistQuick.java.

◆ barF() [2/2]

double umontreal.ssj.probdist.AndersonDarlingDistQuick.barF ( int n,
double x )
static

Computes the complementary distribution function \(\bar{F}_n(x)\) with parameter \(n\).

Reimplemented from umontreal.ssj.probdist.AndersonDarlingDist.

Definition at line 361 of file AndersonDarlingDistQuick.java.

◆ cdf() [1/2]

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

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

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

Reimplemented from umontreal.ssj.probdist.AndersonDarlingDist.

Definition at line 81 of file AndersonDarlingDistQuick.java.

◆ cdf() [2/2]

double umontreal.ssj.probdist.AndersonDarlingDistQuick.cdf ( int n,
double x )
static

Computes the Anderson–Darling distribution function \(F_n(x)\) at.

\(x\) for sample size \(n\). For \(0.2 < x < 5\), the asymptotic distribution \(F_{\infty}(x) = \lim_{n\to\infty} F_n(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 [72]  is used. For \(x < 0.2\), the Marsaglias’ approximation [169]  for \(n=\infty\) is used.

For \(n>6\), the method gives at least 3 decimal digits of precision except for small \(x\); for \(n \le6\), it gives at least 2 decimal digits of precision except for small \(x\). For \(n=1\), the exact formula \(F_1(x) = \sqrt{1 - 4e^{-x-1}}\), for \(x\ge\ln(4) - 1\), is used.

Reimplemented from umontreal.ssj.probdist.AndersonDarlingDist.

Definition at line 343 of file AndersonDarlingDistQuick.java.

◆ density() [1/2]

double umontreal.ssj.probdist.AndersonDarlingDistQuick.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.AndersonDarlingDist.

Definition at line 77 of file AndersonDarlingDistQuick.java.

◆ density() [2/2]

double umontreal.ssj.probdist.AndersonDarlingDistQuick.density ( int n,
double x )
static

Computes the density of the Anderson–Darling distribution with parameter \(n\).

Reimplemented from umontreal.ssj.probdist.AndersonDarlingDist.

Definition at line 97 of file AndersonDarlingDistQuick.java.

◆ inverseF() [1/2]

double umontreal.ssj.probdist.AndersonDarlingDistQuick.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.AndersonDarlingDist.

Definition at line 89 of file AndersonDarlingDistQuick.java.

◆ inverseF() [2/2]

double umontreal.ssj.probdist.AndersonDarlingDistQuick.inverseF ( int n,
double u )
static

Computes the inverse \(x = F_n^{-1}(u)\) of the Anderson–Darling distribution with parameter \(n\).

Reimplemented from umontreal.ssj.probdist.AndersonDarlingDist.

Definition at line 407 of file AndersonDarlingDistQuick.java.

◆ toString()

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

Returns a String containing information about the current distribution.

Reimplemented from umontreal.ssj.probdist.AndersonDarlingDist.

Definition at line 425 of file AndersonDarlingDistQuick.java.


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