美文网首页
python做数理统计

python做数理统计

作者: WooWoods | 来源:发表于2017-09-15 13:17 被阅读165次
  • 卡方分析--独立性检验
from scipy.stats import chi2_contingency
obs = np.array([[77, 784], [453, 6011]])
g, p, dof, expctd = chi2_contingency(obs)
g, p, dof, expctd
(3.9552675787097162,  
0.046724889095159094,
1L,
array([[   62.29761092,   798.70238908],[  467.70238908,  5996.29761092]]))

相关文章

网友评论

      本文标题:python做数理统计

      本文链接:https://www.haomeiwen.com/subject/bkpssxtx.html