|  | 
| 本帖最后由 Menuett 于 2013-12-22 15:59 编辑 6 R' \8 O' d; ?" p* D
 ; @% o' w% V% [- I' o9 {煮酒正熟 发表于 2013-12-20 12:05 ![]() # t9 N8 H! h' X8 ?. ?基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
 0 L5 G5 p2 S1 `这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
 1 t1 M; M3 w5 _) A5 ?
 7 A1 B7 I* O5 B+ b, C结果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)4 S% N  p! C; C* U
 
 5 `! m3 ^8 x/ B$ p: U% V- OR example:
 8 q7 @# V  i8 B6 e, {  y5 @8 }( J& l4 B- f
 > M<-as.table(rbind(c(1668,5173),c(287,930)))
 ( p' S- B# r, ]; `) e7 a> chisq.test(M)
 $ T# B. G, e# j" j' r: O; c2 l
 : F& p: _: R2 X, W        Pearson's Chi-squared test with Yates' continuity correction8 Q" M. ^% l) c) v0 M
 
 / @5 L0 }8 ^6 \( t0 Cdata:  M
 $ h. C- n* M+ MX-squared = 0.3175, df = 1, p-value = 0.5731
 8 z3 s. T4 {  y  ~  u/ ]
 & ], @! s8 e' ~; XPython example:
 / B+ R, H3 E7 J0 `, N4 \( b
 ; V. a$ F( \8 z2 w  b! e>>> from scipy import stats" ~) T* V: D+ F* {5 T: x0 h/ C6 F
 >>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])% x: V' |! |6 @4 u( ~
 (0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692,  5181.26371308],
 " c/ M  s6 q- ?1 S3 z       [  295.26371308,   921.73628692]]))
 | 
 |