|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 / o- u/ x" a7 |' b; K
煮酒正熟 发表于 2013-12-20 12:05
/ s' ~- ^0 |- }/ z8 ~# I3 M% |' T基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... * }. O, g! s; V4 ?) i: K# _
7 y& J4 m$ b, T) z$ Q这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 / P# F. m, A: D7 ?0 j- ?- @
' J) i4 _+ |7 b0 N `' S: I( H
结果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)7 H( a, S' m! o! }
) i3 O9 w" m3 X/ n; ?- a# p+ Z( S: LR example:
k2 E. a' b" @- s4 d% h
" w/ F2 f- f* f> M<-as.table(rbind(c(1668,5173),c(287,930)))4 z; a) l0 ?, }0 y+ d2 Q
> chisq.test(M)
7 _9 l# [4 ]& V) f. Q7 h; w% l4 E% j4 r' L! H
Pearson's Chi-squared test with Yates' continuity correction
5 ?7 L: l z- N- U( @+ t4 f) g0 y# U0 B* R$ c; k$ \* @
data: M, U7 ]& D% c1 w# d: t
X-squared = 0.3175, df = 1, p-value = 0.5731
5 i' [. o: s8 x0 b0 N) n" _# w7 b% Q2 m1 t8 u, E7 i2 f
Python example:
4 {6 a. D2 T5 e/ u' f8 \5 f$ Q
$ t' \$ s+ { U; G/ K>>> from scipy import stats
, c% W4 U( U# F! j6 v>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])! K" d0 R3 z0 Y6 X$ L
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],0 M9 ~8 F! ?$ u! L) Z! V+ L5 o
[ 295.26371308, 921.73628692]])) |
|