|
|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 + x) R) j8 o! I- O+ f3 u6 o1 U
煮酒正熟 发表于 2013-12-20 12:05 $ V$ y( O- P. q& z5 O$ t
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
$ K% b A) d7 q9 h& j& {* m5 ~
2 R9 C4 C/ j, G3 {6 X7 v这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 , {$ ?. j- l* D! }8 d q$ _
7 O2 L: C: n9 h7 I
结果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)( d+ P1 d7 A0 o" f0 N
1 F% h- v2 `, T6 w
R example:
7 ~# w8 R& ^* k% z& g, b$ @* v( Q! z3 k( \8 @5 A4 u
> M<-as.table(rbind(c(1668,5173),c(287,930)))
& J: S2 }" a; g/ Y2 b8 \6 L* p2 V> chisq.test(M)3 y3 O$ s4 D/ [6 l& \; `9 C2 \0 M
4 p" u, q9 b0 M l% n$ }' @+ [ Pearson's Chi-squared test with Yates' continuity correction! i4 z9 w1 @* z8 ?1 v9 G
' B+ V2 A& v' J5 edata: M
. @7 R, U3 T- J- U! n2 P* OX-squared = 0.3175, df = 1, p-value = 0.5731# _9 G2 w$ I/ g5 e
; i+ _0 }9 t/ i1 fPython example:
: I3 S9 e8 Q# K1 |5 \
7 V7 g& W" q; ~, M* D1 o, w/ I>>> from scipy import stats
0 N M$ ]: ]9 ?, |>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
: i- G: A- n7 f5 [# n(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
9 k/ Y: Z& r! n$ T* ]( c" c! [# }) C( W [ 295.26371308, 921.73628692]])) |
|