SSJ
V. labo.

umontreal.iro.lecuyer.probdist
Class KolmogorovSmirnovPlusDist

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

public class KolmogorovSmirnovPlusDist
extends ContinuousDistribution

KolmogorovSmirnovPlusDist

Extends the class ContinuousDistribution for the Kolmogorov-Smirnov+ distribution (see[#!tDAR60a!#,#!tDUR73a!#,#!tBRO07a!#]). Given a sample of n independent uniforms Ui over [0, 1], the Kolmogorov-Smirnov+ statistic Dn+ and the Kolmogorov-Smirnov- statistic Dn-, are defined by

Dn+ = $\displaystyle \htmax_{{1\le j\le n}}^{}$(j/n - U(j)),$\displaystyle \eqlabel$eq:DNp  
Dn- = [tex2html_wrap_indisplay195](U(j) - (j - 1)/n),[tex2html_wrap_indisplay196]eq:DNm  

where the U(j) are the Ui sorted in increasing order. Both statistics follows the same distribution function, i.e. Fn(x) = P[Dn+x] = P[Dn-x].


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
decPrec
 
Constructor Summary
KolmogorovSmirnovPlusDist(int n)
          .
 
Method Summary
 double barF(double x)
          Returns the complementary distribution function.
static double barF(int n, double x)
          .
 double cdf(double x)
          .
static double cdf(int n, double x)
          .
 double density(double x)
          Returns f (x), the density evaluated at x.
static double density(int n, double x)
          .
 int getN()
          .
 double[] getParams()
          .
 double inverseF(double u)
          Returns the inverse distribution function x = F-1(u).
static double inverseF(int n, double u)
          .
 void setN(int n)
          .
 String toString()
          .
 
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

KolmogorovSmirnovPlusDist

public KolmogorovSmirnovPlusDist(int n)
. \begin{tabb}
 Constructs an {\em Kolmogorov-Smirnov\/}+{} distribution for a sample of size $n$.
 \end{tabb}

Method Detail

density

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

Specified by:
density in class ContinuousDistribution
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
. \begin{tabb}Returns the distribution function $F(x)$.
 \end{tabb}
xvalue at which the distribution function is evaluated 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 ContinuousDistribution
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 ContinuousDistribution
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)
. \begin{tabb}Computes the density of the {\em Kolmogorov-Smirnov\/}+ distribution with parameter $n$.
 \end{tabb}


cdf

public static double cdf(int n,
                         double x)
. \begin{tabb}
 Computes the {\em Kolmogorov-Smirnov\/}+ distribution function $F_...
 ...
 $10^{-5}$. %, and the relative error on $\bar F_n(x)$ is less than
 \end{tabb}


barF

public static double barF(int n,
                          double x)
. \begin{tabb}
 Computes the complementary distribution function $\bar F_n(x)$
 with parameter $n$.
 \end{tabb}


inverseF

public static double inverseF(int n,
                              double u)
. \begin{tabb}
 Computes the inverse $x = F^{-1}(u)$\ of the distribution with parameter $n$.
 \end{tabb}


getN

public int getN()
. \begin{tabb}Returns the parameter $n$\ of this object.
 \end{tabb}


setN

public void setN(int n)
. \begin{tabb}Sets the parameter $n$\ of this object.
 \end{tabb}


getParams

public double[] getParams()
. \begin{tabb}
 Returns an array containing the parameter $n$\ of this object.
 \end{tabb}

 


toString

public String toString()
. \begin{hide}
 \par
 \begin{tabb}
 Returns a \texttt{String} containing information about the current distribution.
 \end{tabb}\end{hide}

Overrides:
toString in class Object

SSJ
V. labo.

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