SSJ  3.3.1
Stochastic Simulation in Java
Static Public Member Functions | List of all members
FDist Class Reference

This class provides methods to compute (or approximate) the distribution functions of special types of goodness-of-fit test statistics. More...

Static Public Member Functions

static double kolmogorovSmirnovPlusJumpOne (int N, double a, double x)
 Similar to umontreal.ssj.probdist.KolmogorovSmirnovPlusDist but for the case where the distribution function \(F\) has a jump of size \(a\) at a given point \(x_0\), is zero at the left of \(x_0\), and is continuous at the right of \(x_0\). More...
 
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\). More...
 

Detailed Description

This class provides methods to compute (or approximate) the distribution functions of special types of goodness-of-fit test statistics.

Member Function Documentation

◆ kolmogorovSmirnovPlusJumpOne()

static double kolmogorovSmirnovPlusJumpOne ( int  N,
double  a,
double  x 
)
static

Similar to umontreal.ssj.probdist.KolmogorovSmirnovPlusDist but for the case where the distribution function \(F\) has a jump of size \(a\) at a given point \(x_0\), is zero at the left of \(x_0\), and is continuous at the right of \(x_0\).

The Kolmogorov-Smirnov statistic is defined in that case as

\[ D_N^+(a) = \sup_{a\le u\le1} \left(\hat{F}_N (F^{-1}(u)) - u\right) = \max_{\Rule{0.0pt}{7.0pt}{0.0pt} \lfloor1+aN \le j \le N} \left(j/N - F (V_{(j)})\right). \tag{KSPlusJumpOne} \]

where \(V_{(1)},…,V_{(N)}\) are the observations sorted by increasing order. The method returns an approximation of \(P[D_N^+(a) \le x]\) computed via

\begin{align} P[D_N^+(a) \le x] & = 1 - x \sum_{i=0}^{\lfloor N (1-a-x)\rfloor} \binom{N}{i} \left(\frac{i}{N} + x \right)^{i-1} \left(1 - \frac{i}{N} - x \right)^{N-i}. \tag{DistKSJ1} \\ & = x \sum_{j=0}^{\lfloor N (a+x) \rfloor} \binom{N}{j} \left(\frac{j}{N} - x \right)^j \left(1 - \frac{j}{N} + x \right)^{N-j-1}. \tag{DistKSJ2} \end{align}

The current implementation uses formula ( DistKSJ2 ) when \(N (x+a) < 6.5\) and \(x+a < 0.5\), and uses ( DistKSJ1 ) when \(Nx \ge6.5\) or \(x+a \ge0.5\). Restriction: \(0 < a < 1\).

Parameters
Nsample size
asize of the jump
xpositive or negative Kolmogorov-Smirnov statistic
Returns
the distribution function of the statistic evaluated at x

◆ scan()

static double scan ( int  N,
double  d,
int  m 
)
static

Returns \(F (m)\), the distribution function of the scan statistic with parameters \(N\) and \(d\), evaluated at \(m\).

For a description of this statistic and its distribution, see FBar.scan(int,double,int), which computes its complementary distribution \(\bar{F} (m) = 1 - F (m-1)\).

Parameters
Nsample size ( \(\ge2\))
dlength of the test interval ( \(\in(0,1)\))
mscan statistic
Returns
the distribution function of the statistic evaluated at m

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