{ } Raw JSON

bundles / scipy latest / scipy / stats / _mstats_basic / ks_1samp

function

scipy.stats._mstats_basic:ks_1samp

source: /scipy/stats/_mstats_basic.py :1758

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_like

a 1-D array of observations of random variables.

cdf : str or callable

If 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, optional

Distribution parameters, used if cdf is a string.

alternative : {'two-sided', 'less', 'greater'}, optional

Indicates the alternative hypothesis. Default is 'two-sided'.

method : {'auto', 'exact', 'asymp'}, optional

Defines 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 : float

Value of the Kolmogorov Smirnov test

p : float

Corresponding p-value.

Aliases

  • scipy.stats._mstats_basic.ks_1samp