python - 2 Sample KS test - something seems wrong -
i attempting run kolmogorov-smirnoff test using ks_2samp function scipy determine if histograms of data same distribution. returned p-value doesn't seem quite right though...
for example histogram:
aa, bb, cc = ax1.hist(list1, numpy.arange(a-1, b+3, c), alpha = .5, align = 'mid', rwidth=1, linestyle = 'dashed', linewidth = 1.5) dd, ee, ff = ax1.hist(list2, numpy.arange(a-1, b+3, c), alpha = .5, align = 'mid',rwidth=1) print ks_2samp(aa, dd)`[1]`
i p-value returned of .96, don't seem right...am doing wrong? shouldn't these histograms different enough p-value lower?
ks_2samp
applies kolmogorov-smirnov test 2 samples , tests null hypothesis both come same distribution.
therefore ks_2samp
takes 2 samples (here list1
, list2
) input.
ks_2samp(list1, list2)
Comments
Post a Comment