查看DA的源代码
←
DA
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
=== 正态检验 === ==== QQ 图 ==== <source lang=python> >>> np.random.seed(12345678) >>> x = np.random.normal(5,3,100) >>> stats.probplot(x, plot=plt); plt.show() </source> [https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.probplot.html scipy.stats.probplot()] <br> ==== Shapiro-Wilk ==== Shapiro-Wilk W 检验,基于观测值的排序统计量的协方差矩阵的检验,可以被用于小于等于 50 的样本量下 [https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.shapiro.html scipy.stats.shapiro()] 返回值 [W, p-value] <source lang=python> >>> np.random.seed(12345678) >>> x = np.random.normal(5, 3, 100) >>> np.random.seed() >>> y = np.random.normal(5, 3, 100) >>> stats.shapiro(x) (0.9772805571556091, 0.08144091814756393) >>> stats.shapiro(y) (0.9933551549911499, 0.9085326790809631) </source> p-value: for the hypothesis test <br> ==== Kolmogorov-Smirnov ==== 科尔莫戈罗夫检验(Kolmogorov-Smirnov test),检验样本数据是否服从某一分布,仅适用于连续分布的检验。下例中用它检验正态分布。 <source lang=python> >>> stats.kstest(x,'norm') KstestResult(statistic=0.8801115630229508, pvalue=1.7157931366221766e-92) >>> stats.kstest(y,'norm') KstestResult(statistic=0.8168376836753909, pvalue=1.7239988712511043e-73) </source> [https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.kstest.html scipy.stats.kstest()] p-value: One-tailed or two-tailed p-value <br> ==== Pearson omnibus ==== D'Agostino-Pearson omnibus 检验 [https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.normaltest.html?highlight=omnibus stats.normaltest()] <source lang=python> >>> stats.normaltest(x) NormaltestResult(statistic=6.528044509508757, pvalue=0.03823430021917039) >>> stats.normaltest(y) NormaltestResult(statistic=0.7706971982031684, pvalue=0.6802134730639648) </source> p-value: A 2-sided chi squared '''probability for the hypothesis test''' <br>
返回到
DA
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面