SciPy

scipy.stats.mstats.ks_2samp

scipy.stats.mstats.ks_2samp(data1, data2, alternative='two-sided')[source]

Computes the Kolmogorov-Smirnov test on two samples.

Missing values are discarded.

Parameters:
data1 : array_like

First data set

data2 : array_like

Second data set

alternative : {‘two-sided’, ‘less’, ‘greater’}, optional

Indicates the alternative hypothesis. Default is ‘two-sided’.

Returns:
d : float

Value of the Kolmogorov Smirnov test

p : float

Corresponding p-value.

Previous topic

scipy.stats.mstats.chisquare

Next topic

scipy.stats.mstats.ks_twosamp