scipy.special.smirnovi#
- scipy.special.smirnovi(n, p, out=None) = <ufunc 'smirnovi'>#
Inverse to
smirnov
Returns d such that
smirnov(n, d) == p
, the critical value corresponding to p.- Parameters:
- nint
Number of samples
- pfloat array_like
Probability
- outndarray, optional
Optional output array for the function results
- Returns:
- scalar or ndarray
The value(s) of smirnovi(n, p), the critical values.
See also
smirnov
The Survival Function (SF) for the distribution
scipy.stats.ksone
Provides the functionality as a continuous distribution
kolmogorov
,kolmogi
Functions for the two-sided distribution
scipy.stats.kstwobign
Two-sided Kolmogorov-Smirnov distribution, large n
Notes
smirnov
is used by stats.kstest in the application of the Kolmogorov-Smirnov Goodness of Fit test. For historial reasons this function is exposed in scpy.special, but the recommended way to achieve the most accurate CDF/SF/PDF/PPF/ISF computations is to use the stats.ksone distribution.Examples
>>> from scipy.special import smirnovi, smirnov
>>> n = 24 >>> deviations = [0.1, 0.2, 0.3]
Use
smirnov
to compute the complementary CDF of the Smirnov distribution for the given number of samples and deviations.>>> p = smirnov(n, deviations) >>> p array([0.58105083, 0.12826832, 0.01032231])
The inverse function
smirnovi(n, p)
returnsdeviations
.>>> smirnovi(n, p) array([0.1, 0.2, 0.3])