C# 클래스 Accord.Statistics.Distributions.Univariate.KolmogorovSmirnovDistribution

상속: UnivariateContinuousDistribution, IFormattable
파일 보기 프로젝트 열기: accord-net/framework 1 사용 예제들

공개 메소드들

메소드 설명
Clone ( ) : object

Creates a new object that is a copy of the current instance.

ComplementaryDistributionFunction ( double x ) : double

Gets the complementary cumulative distribution function (ccdf) for this distribution evaluated at point x. This function is also known as the Survival function.

The Complementary Cumulative Distribution Function (CCDF) is the complement of the Cumulative Distribution Function, or 1 minus the CDF.

ComplementaryDistributionFunction ( double n, double x ) : double

Computes the Complementary Cumulative Distribution Function (1-CDF) for the Kolmogorov-Smirnov statistic's distribution.

CumulativeFunction ( double n, double x ) : double

Computes the Cumulative Distribution Function (CDF) for the Kolmogorov-Smirnov statistic's distribution.

This function computes the cumulative probability P[Dn <= x] of the Kolmogorov-Smirnov distribution using multiple methods as suggested by Richard Simard (2010).

Simard partitioned the problem of evaluating the CDF using multiple approximation and asymptotic methods in order to achieve a best compromise between speed and precision. This function follows the same partitioning as Simard, which is described in the table below.

For n <= 140 and: 1/n > x >= 1-1/nUses the Ruben-Gambino formula. 1/n < nx² < 0.754693Uses the Durbin matrix algorithm. 0.754693 <= nx² < 4Uses the Pomeranz algorithm. 4 <= nx² < 18Uses the complementary distribution function. nx² >= 18Returns the constant 1. For 140 < n <= 10^5 nx² >= 18Returns the constant 1. nx^(3/2) < 1.4Durbin matrix algorithm. nx^(3/2) > 1.4Pelz-Good asymptotic series. For n > 10^5 nx² >= 18Returns the constant 1. nx² < 18Pelz-Good asymptotic series.
DistributionFunction ( double x ) : double

Gets the cumulative distribution function (cdf) for this distribution evaluated at point x.

The Cumulative Distribution Function (CDF) describes the cumulative probability that a given value or any value smaller than it will occur.

Durbin ( int n, double d ) : double

Durbin's algorithm for computing P[Dn < d]

The method presented by Marsaglia (2003), as stated in the paper, is based on a succession of developments starting with Kolmogorov and culminating in a masterful treatment by Durbin (1972). Durbin's monograph summarized and extended many previous works published in the years 1933-73.

This function implements the small C procedure provided by Marsaglia on his paper with corrections made by Simard (2010). Further optimizations also have been performed.

References: - Marsaglia, G., Tsang, W. W., Wang, J. (2003) "Evaluating Kolmogorov's Distribution", Journal of Statistical Software, 8 (18), 1–4. jstor. Available on: http://www.jstatsoft.org/v08/i18/paper - Durbin, J. (1972) Distribution Theory for Tests Based on The Sample Distribution Function, Society for Industrial & Applied Mathematics, Philadelphia.
Fit ( double observations, double weights, Fitting options ) : void

Not supported.

KolmogorovSmirnovDistribution ( [ samples ) : System

Creates a new Kolmogorov-Smirnov distribution.

LogProbabilityDensityFunction ( double x ) : double

Not supported.

OneSideDistributionFunction ( double x ) : double

Computes the Upper Tail of the P[Dn >= x] distribution.

This function approximates the upper tail of the P[Dn >= x] distribution using the one-sided Kolmogorov-Smirnov statistic.

OneSideUpperTail ( double n, double x ) : double

Computes the Upper Tail of the P[Dn >= x] distribution.

This function approximates the upper tail of the P[Dn >= x] distribution using the one-sided Kolmogorov-Smirnov statistic.

PelzGood ( double n, double x ) : double

Pelz-Good algorithm for computing lower-tail areas of the Kolmogorov-Smirnov distribution.

As stated in Simard's paper, Pelz and Good (1976) generalized Kolmogorov's approximation to an asymptotic series in 1/sqrt(n).

References: Wolfgang Pelz and I. J. Good, "Approximating the Lower Tail-Areas of the Kolmogorov-Smirnov One-Sample Statistic", Journal of the Royal Statistical Society, Series B. Vol. 38, No. 2 (1976), pp. 152-156

Pomeranz ( int n, double x ) : double

Pomeranz algorithm.

ProbabilityDensityFunction ( double x ) : double

Not supported.

ToString ( string format, IFormatProvider formatProvider ) : string

Returns a System.String that represents this instance.

비공개 메소드들

메소드 설명
computeA ( int n, double A, double z ) : void

Creates matrix A of the Pomeranz algorithm.

computeH ( int n, double A, double H ) : double

Computes matrix H of the Pomeranz algorithm.

computeLimits ( double t, double floors, double ceilings ) : double

Initializes the Pomeranz algorithm.

matrixPower ( double A, int eA, double V, int &eV, int m, int n, double B ) : void

Computes matrix power. Used in the Durbin algorithm.

메소드 상세

Clone() 공개 메소드

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
리턴 object

ComplementaryDistributionFunction() 공개 메소드

Gets the complementary cumulative distribution function (ccdf) for this distribution evaluated at point x. This function is also known as the Survival function.
The Complementary Cumulative Distribution Function (CCDF) is the complement of the Cumulative Distribution Function, or 1 minus the CDF.
public ComplementaryDistributionFunction ( double x ) : double
x double
리턴 double

ComplementaryDistributionFunction() 공개 정적인 메소드

Computes the Complementary Cumulative Distribution Function (1-CDF) for the Kolmogorov-Smirnov statistic's distribution.
public static ComplementaryDistributionFunction ( double n, double x ) : double
n double The sample size.
x double The Kolmogorov-Smirnov statistic.
리턴 double

CumulativeFunction() 공개 정적인 메소드

Computes the Cumulative Distribution Function (CDF) for the Kolmogorov-Smirnov statistic's distribution.

This function computes the cumulative probability P[Dn <= x] of the Kolmogorov-Smirnov distribution using multiple methods as suggested by Richard Simard (2010).

Simard partitioned the problem of evaluating the CDF using multiple approximation and asymptotic methods in order to achieve a best compromise between speed and precision. This function follows the same partitioning as Simard, which is described in the table below.

For n <= 140 and: 1/n > x >= 1-1/nUses the Ruben-Gambino formula. 1/n < nx² < 0.754693Uses the Durbin matrix algorithm. 0.754693 <= nx² < 4Uses the Pomeranz algorithm. 4 <= nx² < 18Uses the complementary distribution function. nx² >= 18Returns the constant 1. For 140 < n <= 10^5 nx² >= 18Returns the constant 1. nx^(3/2) < 1.4Durbin matrix algorithm. nx^(3/2) > 1.4Pelz-Good asymptotic series. For n > 10^5 nx² >= 18Returns the constant 1. nx² < 18Pelz-Good asymptotic series.
public static CumulativeFunction ( double n, double x ) : double
n double The sample size.
x double The Kolmogorov-Smirnov statistic.
리턴 double

DistributionFunction() 공개 메소드

Gets the cumulative distribution function (cdf) for this distribution evaluated at point x.
The Cumulative Distribution Function (CDF) describes the cumulative probability that a given value or any value smaller than it will occur.
public DistributionFunction ( double x ) : double
x double A single point in the distribution range.
리턴 double

Durbin() 공개 정적인 메소드

Durbin's algorithm for computing P[Dn < d]

The method presented by Marsaglia (2003), as stated in the paper, is based on a succession of developments starting with Kolmogorov and culminating in a masterful treatment by Durbin (1972). Durbin's monograph summarized and extended many previous works published in the years 1933-73.

This function implements the small C procedure provided by Marsaglia on his paper with corrections made by Simard (2010). Further optimizations also have been performed.

References: - Marsaglia, G., Tsang, W. W., Wang, J. (2003) "Evaluating Kolmogorov's Distribution", Journal of Statistical Software, 8 (18), 1–4. jstor. Available on: http://www.jstatsoft.org/v08/i18/paper - Durbin, J. (1972) Distribution Theory for Tests Based on The Sample Distribution Function, Society for Industrial & Applied Mathematics, Philadelphia.
public static Durbin ( int n, double d ) : double
n int
d double
리턴 double

Fit() 공개 메소드

Not supported.
public Fit ( double observations, double weights, Fitting options ) : void
observations double
weights double
options Fitting
리턴 void

KolmogorovSmirnovDistribution() 공개 메소드

Creates a new Kolmogorov-Smirnov distribution.
public KolmogorovSmirnovDistribution ( [ samples ) : System
samples [ The number of samples.
리턴 System

LogProbabilityDensityFunction() 공개 메소드

Not supported.
public LogProbabilityDensityFunction ( double x ) : double
x double
리턴 double

OneSideDistributionFunction() 공개 메소드

Computes the Upper Tail of the P[Dn >= x] distribution.
This function approximates the upper tail of the P[Dn >= x] distribution using the one-sided Kolmogorov-Smirnov statistic.
public OneSideDistributionFunction ( double x ) : double
x double
리턴 double

OneSideUpperTail() 공개 정적인 메소드

Computes the Upper Tail of the P[Dn >= x] distribution.
This function approximates the upper tail of the P[Dn >= x] distribution using the one-sided Kolmogorov-Smirnov statistic.
public static OneSideUpperTail ( double n, double x ) : double
n double
x double
리턴 double

PelzGood() 공개 정적인 메소드

Pelz-Good algorithm for computing lower-tail areas of the Kolmogorov-Smirnov distribution.

As stated in Simard's paper, Pelz and Good (1976) generalized Kolmogorov's approximation to an asymptotic series in 1/sqrt(n).

References: Wolfgang Pelz and I. J. Good, "Approximating the Lower Tail-Areas of the Kolmogorov-Smirnov One-Sample Statistic", Journal of the Royal Statistical Society, Series B. Vol. 38, No. 2 (1976), pp. 152-156

public static PelzGood ( double n, double x ) : double
n double
x double
리턴 double

Pomeranz() 공개 정적인 메소드

Pomeranz algorithm.
public static Pomeranz ( int n, double x ) : double
n int
x double
리턴 double

ProbabilityDensityFunction() 공개 메소드

Not supported.
public ProbabilityDensityFunction ( double x ) : double
x double
리턴 double

ToString() 공개 메소드

Returns a System.String that represents this instance.
public ToString ( string format, IFormatProvider formatProvider ) : string
format string
formatProvider IFormatProvider
리턴 string