import scipy
scipy.stats.ttest_rel()
Examples for the use are scores of the same set of student in
different exams, or repeated sampling from the same units.
scipy.stats.kstest()
This performs a test of the distribution G(x) of an observed
random variable against a given distribution F(x)
#例子(1)
from scipy import stats
import numpy as np
x = np.linspace(-15, 15, 9)
D,p = scipy.stats.kstest(x, 'norm')
#(D=0.44435602715924361, p=0.038850142705171065)
#默认two-sided检验,p值太小,x不是norm分布
scipy.stats.ks_2samp()
This tests whether 2 samples are drawn from the same distribution.转载本文请联系原作者获取授权,同时请注明本文来自夏江江科学网博客。
链接地址:http://blog.sciencenet.cn/blog-669638-1020758.html
下一篇:python-符号运算(求导等)