|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
7 W! u" i6 V8 c9 S: Y煮酒正熟 发表于 2013-12-20 12:05 & I: J& c' t# v9 X
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
' J4 ^; [0 i4 i: ~* X# [, q2 E& | X, ~9 @6 U& R* j M7 z
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
2 s& F# T* X, a e K; \0 R' X' _; ] C. |9 X! F/ H3 d
结果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)
U: i; e; f2 E/ q& n7 v7 d
, S" c, `3 x8 Y& yR example:* s/ U" T- Z. W; v
' R6 v. E z! V> M<-as.table(rbind(c(1668,5173),c(287,930)))& w/ b" V7 J0 ]2 s6 v
> chisq.test(M)
6 h7 G! Q N: A1 S. p9 B1 a" j* b4 ^) P% r6 T) z
Pearson's Chi-squared test with Yates' continuity correction3 C1 B' ~) F2 s+ g m" `% c
: G" l. N8 g* h7 U3 Bdata: M: ]7 }# ]0 `( B: @
X-squared = 0.3175, df = 1, p-value = 0.5731 T. h$ `* w1 ]- |9 f# Z, n+ Y
, B6 @6 \7 \. @0 QPython example:
" y( A9 q3 d9 Z4 ], A
% \4 y, v; C7 K ^( x>>> from scipy import stats0 Z; k9 N% y3 l/ t
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]]). v: I& ~2 b6 d D2 I) ~
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],; e6 g8 }2 z% R5 N
[ 295.26371308, 921.73628692]])) |
|