|
SSJ V. 2.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.gof.FDist
public class FDist
WARNING: Most methods in this class are deprecated.
The method cdf of the appropriate class in package
probdist
should be used instead.
This class provides methods to compute (or approximate) the distribution functions of various types of goodness-of-fit test statistics. All the methods in this class return F(x) for some probability distribution. Recall that the distribution function of a continuous random variable X with density f is
Method Summary | |
---|---|
static double |
andersonDarling(int N,
double x)
Deprecated. |
static double |
cramerVonMises(int N,
double x)
Deprecated. |
static double |
kolmogorovSmirnov(int N,
double x)
Deprecated. |
static double |
kolmogorovSmirnovPlus(int N,
double x)
Deprecated. |
static double |
kolmogorovSmirnovPlusJumpOne(int N,
double a,
double x)
Similar to kolmogorovSmirnovPlus but for the case where the distribution
function F has a jump of size a at a given point x0,
is zero at the left of x0,
and is continuous at the right of x0. |
static double |
scan(int N,
double d,
int m)
Returns F(m), the distribution function of the scan statistic with parameters N and d, evaluated at m. |
static double |
watsonG(int N,
double x)
Deprecated. |
static double |
watsonU(int N,
double x)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
@Deprecated public static double kolmogorovSmirnovPlus(int N, double x)
KolmogorovSmirnovPlusDist.cdf
(N, x)
instead.
Returns p(x) = P[DN+ <= x], the distribution function of the Kolmogorov-Smirnov+ statistic.
GofStat
.
The relative error on
p(x) = P[DN+ <= x] is always less than
10-5, and the relative error on 1 - p(x) is less than
10-1 when
1 - p(x) > 10-10.
The absolute error on 1 - p(x) is less than 10-11
when
1 - p(x) < 10-10.
N
- sample sizex
- positive or negative Kolmogorov-Smirnov statistic
@Deprecated public static double kolmogorovSmirnov(int N, double x)
KolmogorovSmirnovDistQuick.cdf
(N, x)
instead.
Returns
p(x) = P[DN <= x], where
DN = max(DN+, DN-)
is the two-sided Kolmogorov-Smirnov statistic for a sample of size N
.
The implemented approximation improves
when N increase or x goes away from 0.
The error on p(x) is less than 1 percent (approximately) for N > 100.
Warning: for 1 < N < 10 or x in the lower tail, the approximation is bad. But the precision is at least 1 decimal digit nearly everywhere.
N
- sample sizex
- Kolmogorov-Smirnov statistic
public static double kolmogorovSmirnovPlusJumpOne(int N, double a, double x)
kolmogorovSmirnovPlus
but for the case where the distribution
function F has a jump of size a at a given point x0,
is zero at the left of x0,
and is continuous at the right of x0.
Restriction: 0 < a < 1.
N
- sample sizea
- size of the jumpx
- positive or negative Kolmogorov-Smirnov statistic
@Deprecated public static double cramerVonMises(int N, double x)
CramerVonMisesDist.cdf
(N, x)
instead.
Returns an approximation of
P[WN2 <= x], where WN2 is the
Cramér-von Mises statistic
for a sample of independent uniforms over (0, 1).
The approximation is based on the
distribution function of
W2 = limN -> ∞WN2.
For N = 10, 20, 40, the error is less than
0.002, 0.001, and 0.0005, respectively, while for
N >= 100 it is less than 0.0005.
For
N -> ∞, we estimate that the method returns
at least 6 decimal digits of precision.
For N = 1, the method computes the exact distribution:
P(W12 <= x) = 2(x - 1/12)1/2 for
1/12 <= x <= 1/3.
N
- sample sizex
- Cramér-von Mises statistic
@Deprecated public static double watsonU(int N, double x)
WatsonUDist.cdf
(N, x)
instead.
Returns
P[U2 <= x], where U2 is the Watson statistic
in the limit when
N -> ∞,
for a sample of independent uniforms over (0, 1).
Only this limiting distribution (when
N -> ∞) is implemented.
It is given by
N
- sample sizex
- Watson statistic
@Deprecated public static double watsonG(int N, double x)
WatsonGDist.cdf
(N, x)
instead.
Returns an approximation of
P[GN <= x], where GN is the
Watson statistic defined in watsonU
,
for a sample of independent uniforms over (0, 1).
The approximation is computed in a similar way as for
cramerVonMises
.
To implement this method, a table of the values of
g(x) = limN -> ∞P[GN <= x] and of its derivative
was first computed by numerical integration.
For x <= 1.5, the method uses this table with cubic spline
interpolation.
For x > 1.5, it uses the empirical curve
g(x) = 1 - e19-20x.
A correction of order
1/(N)1/2, obtained
empirically from 107 simulation runs with N = 256 and also
implemented as an interpolation table with an exponential tail,
is then added.
The absolute error is estimated to be less than
0.01, 0.005, 0.002, 0.0008, 0.0005, 0.0005, 0.0005 for
N = 16, 32, 64, 128, 256, 512, 1024, respectively.
N
- sample sizex
- Watson statistic
@Deprecated public static double andersonDarling(int N, double x)
AndersonDarlingDistQuick.cdf
(N, x)
instead.
Returns
P[AN2 <= x], where AN2 is the
Anderson-Darling statistic for a sample of independent uniforms over (0, 1).
The approximation is computed similarly as for
cramerVonMises
.
To implement this method, an interpolation table of the values of
g(x) = limN -> ∞P[AN2 <= x]
was first computed by numerical integration.
Then a linear correction in 1/N obtained by simulation was added.
The absolute error on gN(x) is estimated to be
less than 0.001 for N > 6.
For N = 2, 3, 4, 6, it is estimated to be
less than 0.04, 0.01, 0.005, 0.002, respectively.
For N = 1, the method returns the exact value,
gN(x) = (1 - 4e-x-1)1/2 for
x >= ln(4) - 1.
N
- sample sizex
- Anderson-Darling statistic
public static double scan(int N, double d, int m)
scan
,
which computes its complementary distribution
bar(F)(m) = 1 - F(m - 1).
N
- sample size ( >= 2)d
- length of the test interval (∈(0, 1))m
- scan statistic
|
SSJ V. 2.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |