python进行各项统计检验_科学网—python 统计方法-分布检验 - 夏江江的博文

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-符号运算(求导等)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值