|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 5 s, q( L7 |$ ?5 y2 x9 D9 n
煮酒正熟 发表于 2013-12-20 12:05 ![]()
; K! @7 p2 X" M7 x' N: u# G基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... ) d, @ \' { H$ V5 Q1 o Y) J
?9 j0 c, Z8 @% h6 @. F: E
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
) v7 S- l; j: l, R
4 }& L1 s; x) @9 J结果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)' g2 s; Q2 j$ _7 e/ W6 E
* q0 M9 V$ y6 v: x& d
R example:( O) y+ G, P' ^) k5 D; }
% g* S7 t% I7 w) P0 [& w
> M<-as.table(rbind(c(1668,5173),c(287,930)))3 T" Q% ^& |8 C0 I2 l
> chisq.test(M)
1 V9 d: X+ w+ ^/ |4 _; e. c# b4 Y. N; r; ]7 |3 p% [
Pearson's Chi-squared test with Yates' continuity correction
( I4 |* c% J7 \+ r" [8 x7 P, @1 @. o, D( |% }5 E: a: r
data: M6 @: a! |( O6 p' @* C N7 u
X-squared = 0.3175, df = 1, p-value = 0.5731
" o! U; e7 E7 k( F3 ?; ~/ v" e+ }6 r! V
Python example:, J- O* s- ^5 d9 w0 t, b3 @/ R4 W
! `& K( u5 J `7 C# C>>> from scipy import stats! p) A4 e7 J3 o p+ X
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])8 _) X+ I# f: t
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
& g1 E- u% r/ p/ R1 E [ 295.26371308, 921.73628692]])) |
|