|
|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 1 m$ V% a; `; v* x$ R/ N* p) k/ ?* R
煮酒正熟 发表于 2013-12-20 12:05 6 ?8 O" L& K# I5 j
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... . m7 X @( ~% b, C( O! O- N
3 N- P2 s2 O* ?* }6 H这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 , Y2 K1 p' f: @6 Q X& g
- X7 \2 `9 B5 q0 n' ]结果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)
$ c+ T8 {$ D1 r5 P0 b( d: `$ f! J! |9 \6 H
R example:
" t. w; R# p( r$ U, K4 e$ a( P9 i6 `8 X; {) }( o, \$ J
> M<-as.table(rbind(c(1668,5173),c(287,930)))$ i1 F1 S3 a3 Q& F
> chisq.test(M)$ q0 w* e0 f1 {
# x2 y. X% `# Z8 s1 F Pearson's Chi-squared test with Yates' continuity correction- n3 {9 I) ]# Q+ ^3 P
" ]- t& A [5 @8 S2 C3 X4 }6 Zdata: M
' j5 C# O, }* |( ~ [X-squared = 0.3175, df = 1, p-value = 0.5731
5 r# x1 x& w9 ~7 o% r
% b- m& d# m% b& F8 ~! i% Y- UPython example:
$ }, a+ C: w2 ?- Z) y, c3 ~8 P0 l9 k! ]6 f, N
>>> from scipy import stats) `5 Q+ c- L8 x$ t$ y
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])" y7 r. F4 Y. V0 X
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],$ N( ^) i1 m3 X3 V1 }8 A, W& e
[ 295.26371308, 921.73628692]])) |
|