【问题标题】:n-sample test for equality of proportions python比例相等python的n样本测试
【发布时间】:2017-09-15 20:43:15
【问题描述】:

python 比例相等的 n 样本测试

这个统计测试在 R 中看起来很简单> http://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/R/R6_CategoricalDataAnalysis/R6_CategoricalDataAnalysis6.html

我查看了 scipy,它没有提供超过 2 个样本测试的统计工具

我正在寻找能够进行此类高级统计测试的 python 库。

【问题讨论】:

    标签: python scipy data-analysis


    【解决方案1】:

    我假设您要做的是对不同类别之间的比例独立性进行卡方检验(请参阅https://en.wikipedia.org/wiki/Pearson%27s_chi-squared_test#Testing_for_statistical_independence)。您可以在 Python 中使用函数scipy.stats.chi2_contingency 执行此操作(有关文档,请参阅https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.chi2_contingency.html)。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-12-28
    • 2021-08-19
    • 2016-06-30
    • 2016-02-28
    • 2011-11-08
    • 1970-01-01
    • 2021-09-24
    • 2014-11-27
    相关资源
    最近更新 更多