bundles / scipy 1.17.1 / scipy / stats / _mstats_basic / ks_1samp
function
scipy.stats._mstats_basic:ks_1samp
Signature
def ks_1samp ( x , cdf , args = () , alternative = two-sided , method = auto ) Summary
Computes the Kolmogorov-Smirnov test on one sample of masked values.
Extended Summary
Missing values in x are discarded.
Parameters
x: array_likea 1-D array of observations of random variables.
cdf: str or callableIf a string, it should be the name of a distribution in scipy.stats. If a callable, that callable is used to calculate the cdf.
args: tuple, sequence, optionalDistribution parameters, used if
cdfis a string.alternative: {'two-sided', 'less', 'greater'}, optionalIndicates the alternative hypothesis. Default is 'two-sided'.
method: {'auto', 'exact', 'asymp'}, optionalDefines the method used for calculating the p-value. The following options are available (default is 'auto'):
'auto'use 'exact' for small size arrays, 'asymp' for large
'exact'use approximation to exact distribution of test statistic
'asymp'use asymptotic distribution of test statistic
Returns
d: floatValue of the Kolmogorov Smirnov test
p: floatCorresponding p-value.
Aliases
-
scipy.stats._mstats_basic.ks_1samp