Class KolmogorovDistribution
- java.lang.Object
-
- dev.nm.stat.test.distribution.kolmogorov.KolmogorovDistribution
-
- All Implemented Interfaces:
ProbabilityDistribution
public class KolmogorovDistribution extends Object implements ProbabilityDistribution
The Kolmogorov distribution is the distribution of the Kolmogorov-Smirnov statistic. The statistic is defined as the supremum of the absolute difference between the empirical and reference distributions.- See Also:
- "George Marsaglia, Wai Wan Tsang, Jingbo Wang, "Evaluating Kolmogorov's distribution," Journal of Statistical Software, 8/18."
- "J. H. Drew, A. G. Glen, and L. M. Leemis, "Computing the cumulative distribution function of the Kolmogorov-Smirnov statistic," Computational Statistics and Data Analysis 34 (2000) 1-15."
- Wikipedia: Kolmogorov distribution
-
-
Constructor Summary
Constructors Constructor Description KolmogorovDistribution(int n)Construct a Kolmogorov distribution for a sample size n.KolmogorovDistribution(int n, int bigN, boolean rightTailApproximation)Construct a Kolmogorov distribution for a sample size n.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static doubleasymptoticCDF(double x)This is the asymptotic distribution of the Kolmogorov distribution.doublecdf(double d)Gets the cumulative probability F(x) = Pr(X ≤ x).doubledensity(double x)Deprecated.doubleentropy()Deprecated.doublekurtosis()Deprecated.doublemean()Deprecated.doublemedian()Deprecated.doublemoment(double x)Deprecated.doublequantile(double u)Deprecated.doubleskew()Deprecated.doublevariance()Deprecated.
-
-
-
Constructor Detail
-
KolmogorovDistribution
public KolmogorovDistribution(int n, int bigN, boolean rightTailApproximation)Construct a Kolmogorov distribution for a sample size n.- Parameters:
n- the number of observationsbigN- the threshold to use the asymptotic distribution when n > bigNrightTailApproximation-trueif we use the right tail approximation; the accuracy is up to 7 digits
-
KolmogorovDistribution
public KolmogorovDistribution(int n)
Construct a Kolmogorov distribution for a sample size n. We use the asymptotic distribution when n > 16000. We use an approximation for the right tail.- Parameters:
n- the number of observations
-
-
Method Detail
-
mean
@Deprecated public double mean()
Deprecated.Description copied from interface:ProbabilityDistributionGets the mean of this distribution.- Specified by:
meanin interfaceProbabilityDistribution- Returns:
- the mean
- See Also:
- Wikipedia: Expected value
-
median
@Deprecated public double median()
Deprecated.Description copied from interface:ProbabilityDistributionGets the median of this distribution.- Specified by:
medianin interfaceProbabilityDistribution- Returns:
- the median
- See Also:
- Wikipedia: Median
-
variance
@Deprecated public double variance()
Deprecated.Description copied from interface:ProbabilityDistributionGets the variance of this distribution.- Specified by:
variancein interfaceProbabilityDistribution- Returns:
- the variance
- See Also:
- Wikipedia: Variance
-
skew
@Deprecated public double skew()
Deprecated.Description copied from interface:ProbabilityDistributionGets the skewness of this distribution.- Specified by:
skewin interfaceProbabilityDistribution- Returns:
- the skewness
- See Also:
- Wikipedia: Skewness
-
kurtosis
@Deprecated public double kurtosis()
Deprecated.Description copied from interface:ProbabilityDistributionGets the excess kurtosis of this distribution.- Specified by:
kurtosisin interfaceProbabilityDistribution- Returns:
- the excess kurtosis
- See Also:
- Wikipedia: Kurtosis
-
entropy
@Deprecated public double entropy()
Deprecated.Description copied from interface:ProbabilityDistributionGets the entropy of this distribution.- Specified by:
entropyin interfaceProbabilityDistribution- Returns:
- the entropy
- See Also:
- Wikipedia: Entropy (information theory)
-
cdf
public double cdf(double d)
Description copied from interface:ProbabilityDistributionGets the cumulative probability F(x) = Pr(X ≤ x).- Specified by:
cdfin interfaceProbabilityDistribution- Parameters:
d- x- Returns:
- F(x) = Pr(X ≤ x)
- See Also:
- Wikipedia: Cumulative distribution function
-
asymptoticCDF
public static double asymptoticCDF(double x)
This is the asymptotic distribution of the Kolmogorov distribution.- Parameters:
x- a critical value- Returns:
- F(x)
- See Also:
- Wikipedia: Kolmogorov distribution
-
quantile
@Deprecated public double quantile(double u)
Deprecated.Description copied from interface:ProbabilityDistributionGets the quantile, the inverse of the cumulative distribution function. It is the value below which random draws from the distribution would fall u×100 percent of the time.
This may not always exist.F-1(u) = x, such that Pr(X ≤ x) = u
- Specified by:
quantilein interfaceProbabilityDistribution- Parameters:
u-u, a quantile- Returns:
- F-1(u)
- See Also:
- Wikipedia: Quantile function
-
density
@Deprecated public double density(double x)
Deprecated.Description copied from interface:ProbabilityDistributionThe density function, which, if exists, is the derivative of F. It describes the density of probability at each point in the sample space.f(x) = dF(X) / dx
This may not always exist. For the discrete cases, this is the probability mass function. It gives the probability that a discrete random variable is exactly equal to some value.- Specified by:
densityin interfaceProbabilityDistribution- Parameters:
x- x- Returns:
- f(x)
- See Also:
-
moment
@Deprecated public double moment(double x)
Deprecated.Description copied from interface:ProbabilityDistributionThe moment generating function is the expected value of etX. That is,E(etX)
This may not always exist.- Specified by:
momentin interfaceProbabilityDistribution- Parameters:
x- t- Returns:
- E(exp(tX))
- See Also:
- Wikipedia: Moment-generating function
-
-