Extends the class ContinuousDistribution for the Anderson–Darling distribution (see [6], [161], [169],. More...
Public Member Functions | |
| AndersonDarlingDist (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)\). | |
| 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. | |
| 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 | 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)\), with parameter \(n\), using Marsaglia’s and al. | |
| 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\). | |
Extends the class ContinuousDistribution for the Anderson–Darling distribution (see [6], [161], [169],.
[216] ). Given a sample of \(n\) independent uniforms \(U_i\) over \((0,1)\), the Anderson–Darling statistic \(A_n^2\) is defined by
\begin{align*} A_n^2 & = -n -\frac{1}{n} \sum_{j=1}^n \left\{ (2j-1)\ln(U_{(j)}) + (2n+1-2j) \ln(1-U_{(j)}) \right\}, \tag{Andar} \end{align*}
where the \(U_{(j)}\) are the \(U_i\) sorted in increasing order. The distribution function (the cumulative probabilities) is defined as \(F_n(x) = P[A_n^2 \le x]\).
Definition at line 48 of file AndersonDarlingDist.java.
| umontreal.ssj.probdist.AndersonDarlingDist.AndersonDarlingDist | ( | int | n | ) |
Constructs an Anderson–Darling distribution for a sample of size \(n\).
Definition at line 68 of file AndersonDarlingDist.java.
| double umontreal.ssj.probdist.AndersonDarlingDist.barF | ( | double | x | ) |
Returns the complementary distribution function.
The default implementation computes \(\bar{F}(x) = 1 - F(x)\).
| x | value at which the complementary distribution function is evaluated |
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Reimplemented in umontreal.ssj.probdist.AndersonDarlingDistQuick.
Definition at line 80 of file AndersonDarlingDist.java.
|
static |
Computes the complementary distribution function \(\bar{F}_n(x)\) with parameter \(n\).
Reimplemented in umontreal.ssj.probdist.AndersonDarlingDistQuick.
Definition at line 257 of file AndersonDarlingDist.java.
| double umontreal.ssj.probdist.AndersonDarlingDist.cdf | ( | double | x | ) |
Returns the distribution function \(F(x)\).
| x | value at which the distribution function is evaluated |
Implements umontreal.ssj.probdist.Distribution.
Reimplemented in umontreal.ssj.probdist.AndersonDarlingDistQuick.
Definition at line 76 of file AndersonDarlingDist.java.
|
static |
Computes the Anderson–Darling distribution function \(F_n(x)\), with parameter \(n\), using Marsaglia’s and al.
algorithm
[169] . First the asymptotic distribution for \(n\to\infty\) is computed. Then an empirical correction obtained by simulation is added for finite \(n\).
Reimplemented in umontreal.ssj.probdist.AndersonDarlingDistQuick.
Definition at line 223 of file AndersonDarlingDist.java.
| double umontreal.ssj.probdist.AndersonDarlingDist.density | ( | double | x | ) |
Returns \(f(x)\), the density evaluated at \(x\).
| x | value at which the density is evaluated |
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Reimplemented in umontreal.ssj.probdist.AndersonDarlingDistQuick.
Definition at line 72 of file AndersonDarlingDist.java.
|
static |
Computes the density of the Anderson–Darling distribution with parameter \(n\).
Reimplemented in umontreal.ssj.probdist.AndersonDarlingDistQuick.
Definition at line 106 of file AndersonDarlingDist.java.
| int umontreal.ssj.probdist.AndersonDarlingDist.getN | ( | ) |
Returns the parameter \(n\) of this object.
Definition at line 297 of file AndersonDarlingDist.java.
| double[] umontreal.ssj.probdist.AndersonDarlingDist.getParams | ( | ) |
Return an array containing the parameter \(n\) of the current distribution.
Implements umontreal.ssj.probdist.Distribution.
Definition at line 320 of file AndersonDarlingDist.java.
| double umontreal.ssj.probdist.AndersonDarlingDist.inverseF | ( | double | u | ) |
Returns the inverse distribution function \(x = F^{-1}(u)\).
Restrictions: \(u \in[0,1]\).
| u | value at which the inverse distribution function is evaluated |
| IllegalArgumentException | if \(u\) is not in the interval \([0,1]\) |
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Reimplemented in umontreal.ssj.probdist.AndersonDarlingDistQuick.
Definition at line 84 of file AndersonDarlingDist.java.
|
static |
Computes the inverse \(x = F_n^{-1}(u)\) of the Anderson–Darling distribution with parameter \(n\).
Reimplemented in umontreal.ssj.probdist.AndersonDarlingDistQuick.
Definition at line 279 of file AndersonDarlingDist.java.
| void umontreal.ssj.probdist.AndersonDarlingDist.setN | ( | int | n | ) |
Sets the parameter \(n\) of this object.
Definition at line 304 of file AndersonDarlingDist.java.
| String umontreal.ssj.probdist.AndersonDarlingDist.toString | ( | ) |
Returns a String containing information about the current distribution.
Reimplemented in umontreal.ssj.probdist.AndersonDarlingDistQuick.
Definition at line 328 of file AndersonDarlingDist.java.