9
我正在尋找在Python測試,這是否:類似Python的比例測試prop.test R中
> survivors <- matrix(c(1781,1443,135,47), ncol=2)
> colnames(survivors) <- c('survived','died')
> rownames(survivors) <- c('no seat belt','seat belt')
> survivors
survived died
no seat belt 1781 135
seat belt 1443 47
> prop.test(survivors)
2-sample test for equality of proportions with continuity correction
data: survivors
X-squared = 24.3328, df = 1, p-value = 8.105e-07
alternative hypothesis: two.sided
95 percent confidence interval:
-0.05400606 -0.02382527
sample estimates:
prop 1 prop 2
0.9295407 0.9684564
我在p-value
計算最感興趣。
的例子是採取形式here
我應該怎麼做才能提高我的問題嗎? – Akavall 2014-10-28 17:50:21
我想它看起來有點像「請谷歌對我來說」的問題。 statsmodels包+文檔可能是一個有趣的地方,以及看看:http://statsmodels.sourceforge.net/devel/stats.html – cel 2014-10-28 18:15:03
@cel,也許就是這樣,我做了我自己的谷歌搜索,但我認爲我最終得到它。如果你看起來功能的名稱是非常不同的,並且在Google搜索「比例測試」之後發現它有一些問題。 – Akavall 2014-10-28 18:20:49