ComputeKolmogorovStatistics¶
- ComputeKolmogorovStatistics(sample, distribution)¶
Compute the unscaled Kolmogorov distance between a sample and a distribution.
The distance is the maximum absolute deviation between the empirical CDF of the given sample and the CDF of the given distribution.
- Parameters:
- sample2-d float array
A continuous 1D distribution sample.
- distribution
Distribution
A continuous 1D distribution.
- Returns:
- distancefloat
The Kolmogorov distance.
Examples
>>> import openturns as ot >>> ot.RandomGenerator.SetSeed(0) >>> distribution = ot.Normal() >>> sample = distribution.getSample(20) >>> ot.FittingTest.ComputeKolmogorovStatistics(sample, distribution) 0.14727...