|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
' C7 i; x) |; e0 l5 A# f8 }1 Y煮酒正熟 发表于 2013-12-20 12:05 9 F& i0 M5 ]3 M8 z& @ _( f7 N
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... ) G" f1 u }) @5 H, [7 V7 B# f ^
: x; | {) e2 I" h5 o7 Q( x+ t. L+ M这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 , W! D7 A. H, Q5 @6 I6 D
8 H7 S6 v; n2 l% @# k
结果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 f+ v' t# C2 J& k/ f6 f
% L4 b# T; h y3 ]5 f
R example:
7 e$ K* l( e: w8 h1 O4 H
$ ]5 ~/ O3 P6 _9 u8 d4 T% R> M<-as.table(rbind(c(1668,5173),c(287,930)))2 B& g/ W3 K, q2 W m( e% W
> chisq.test(M)
6 k' r! S" p4 M* {1 E4 {# d" V8 l- j. C& ]
Pearson's Chi-squared test with Yates' continuity correction4 n1 S0 a/ f }* _
0 h. L ~; l+ y) C. V: b7 Ldata: M& D- ^8 `- Z! y% Z( b# u
X-squared = 0.3175, df = 1, p-value = 0.5731
) g$ n( H, W7 L. G3 \* p" p! f& `2 l7 }+ ^
Python example:0 G/ d4 A2 {+ {% N+ a# Z+ l8 j! `
9 A+ v$ @7 N' Z/ l>>> from scipy import stats
# c- h- n( b) H; ]. a>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])9 r M% `$ C8 ^* i# I; ?
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
5 j# @. A; H% u% g' M" e d* @3 r, M [ 295.26371308, 921.73628692]])) |
|