ks_2samp — SciPy v1.15.2 Manual (original) (raw)

scipy.stats.mstats.

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

Computes the Kolmogorov-Smirnov test on two samples.

Missing values in x and/or y are discarded.

Parameters:

data1array_like

First data set

data2array_like

Second data set

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’):

Returns:

dfloat

Value of the Kolmogorov Smirnov test

pfloat

Corresponding p-value.