|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 + Q, }! y+ P' o. L
煮酒正熟 发表于 2013-12-20 12:05 ) L3 E6 [$ O6 y# | F, A
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
3 T$ K/ N7 T% }
% e; Z/ x1 J) Z- ?这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 / r2 Q6 x, k* I3 Z1 t4 t: u- B
0 d5 I/ x J4 E7 g) 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)
& M* ~% V B( Q! E+ @6 x& `8 d2 o! f# ]
R example:4 s. b5 ]8 F3 a& E8 d; Z" l
4 ~( p7 A$ e0 \ l; {% V/ U
> M<-as.table(rbind(c(1668,5173),c(287,930)))
a) d L( k7 O2 t' d! a5 w> chisq.test(M)8 K7 j8 G& B- i5 J# U
Q9 H7 N/ D1 \! T( I5 A, S
Pearson's Chi-squared test with Yates' continuity correction
. z, B/ F% a. h& K( Y* _' T+ n1 e1 o4 F' ~
data: M
, u L1 F& B5 F8 bX-squared = 0.3175, df = 1, p-value = 0.5731
" A7 L& t2 G6 O% ?4 q9 s; v! ^4 |, q# m8 ?5 V# L
Python example:; U* h" P" G, F: k( j4 A% }+ P2 B7 }' y
! a* l+ A2 H8 x4 n
>>> from scipy import stats3 K1 `( f; k. ?0 @; m
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
% R& U+ c: g% C2 D(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],) Q7 U, z* M# S4 \( a$ S' F
[ 295.26371308, 921.73628692]])) |
|