|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 5 a* k/ h3 {/ g) t! k+ G% B! i \
煮酒正熟 发表于 2013-12-20 12:05 ![]()
( @0 h, I+ x N- R/ g Z基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
# ]2 S' l' o+ R& Y+ I) p y8 u1 S: ?$ @2 R+ z6 q+ Y5 a. C, h
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
3 b7 z3 R9 q* e2 I. ~* P/ H
9 `2 Z2 H8 @5 r7 c; Q# ]结果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)# Q) F) \/ p" v
G0 ]4 E( j7 T. o% B
R example: E* r# @4 F; Y
; a- N& g+ j, Z+ w1 M> M<-as.table(rbind(c(1668,5173),c(287,930)))
% ] Z0 s9 f" b6 f- H# S6 c4 w> chisq.test(M): t' F8 t1 V# U
; s3 f h2 a& t0 P, I" B/ r3 o Pearson's Chi-squared test with Yates' continuity correction
2 q3 V! i) l. a' \; _
- Z H# Y; t Tdata: M; K" i- t; U& @( p! ?+ P
X-squared = 0.3175, df = 1, p-value = 0.5731
0 c0 V5 t; R5 S4 }
9 ]% V* }2 A0 y7 Y5 o! sPython example:2 ?. r0 {& j1 x8 z9 h: i2 c2 t7 e, D
: p- b+ K( j$ l0 Q n+ {
>>> from scipy import stats) l3 y% w# W! j
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]]); l1 x* r# }7 M' P/ f4 `
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],& A _2 F7 l: y$ f- O) ?8 w
[ 295.26371308, 921.73628692]])) |
|