|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 * I1 W: q2 l8 y" J) D' {5 }5 k* T7 \
煮酒正熟 发表于 2013-12-20 12:05 ![]()
- M6 @. H% o6 W& h基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... ( i$ ~$ c8 k/ D) m
/ Y1 r; ~, y; J这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 ; B$ c& V+ d, |2 m5 M6 G x
& ~* m: Q: R+ b结果p=0.5731。 远远不显著。要在alpha level 0.05的水平上检验出76.42%和75.62%的区别,即使实验组和对照组各自样本大小相同,各自尚需44735个样本(At power level 80%)。see: Statistical Methods for Rates and Proportions by Joseph L. Fleiss (1981)- A, b0 h$ p; x# `
. O! Q: [7 B: j1 ?$ uR example:
7 x, Z! u" k& U+ o1 r
' A, Y7 N5 F1 a6 L> M<-as.table(rbind(c(1668,5173),c(287,930)))
9 s9 f- ~$ B* K2 p: G# N> chisq.test(M)% H. V5 f- D+ \1 I8 J: F, [
( O8 a% L! t7 S4 K% e
Pearson's Chi-squared test with Yates' continuity correction5 `" ~; y& T, m }* O! V/ ^
9 q6 O o- {$ e7 j2 p8 X& B
data: M
- |+ G& H& q; q. N3 S3 RX-squared = 0.3175, df = 1, p-value = 0.57317 X4 s1 H9 n# u" ]& ~
( B+ q& U# I4 P0 l+ k m- a3 W wPython example:3 T% K1 a( A1 N! b
( O2 Q% q& R/ E2 B3 d>>> from scipy import stats
8 y6 \ @" x3 i9 v$ _>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
- g- @; @7 V3 m(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],$ V( X/ M- ~( l- M' T3 s
[ 295.26371308, 921.73628692]])) |
|