|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
; Z$ e/ l( _: Z# @: I. N煮酒正熟 发表于 2013-12-20 12:05
# k3 }# g% V8 J' ^基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... 5 A( b" z$ P4 x% s/ u- B
( y9 R! q* ?/ j& y
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
1 _0 f# z' r' S' [
3 h1 f0 ?9 k; m2 C! t0 F) a, a结果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 {& M, M# u( o
* A* x9 c9 @) O; j6 r+ ]# e* O+ ]) DR example:; [( ~" v' `% @0 o. l
# S4 ?! g8 l8 m+ }. U> M<-as.table(rbind(c(1668,5173),c(287,930)))
9 n. \$ f( L w3 @* I; l> chisq.test(M): q0 d% b& h' m% p2 ^! f2 w
' y- j3 z9 g/ H, O) C( X Pearson's Chi-squared test with Yates' continuity correction, P* K7 H2 X @/ V ^6 n
* E1 a2 Z7 Y0 V2 tdata: M
, L$ F) s2 O L( S1 _) t8 AX-squared = 0.3175, df = 1, p-value = 0.5731
. o3 d6 Y& N8 H5 G. Z0 q& D* j1 d6 l/ \3 p2 R8 q$ a' S
Python example:. o8 X& w2 ^9 O. Q5 G0 h* Z
7 O! X& q5 ] B- b/ p8 Y7 Y; A
>>> from scipy import stats% V6 A6 I- @4 N1 Z4 X) T
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])* S# o; c4 [ W1 Y" [* c6 r
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
# n d0 R: e' ^% J. K [ 295.26371308, 921.73628692]])) |
|