|
|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 2 K7 F4 A& i3 v8 y( y
煮酒正熟 发表于 2013-12-20 12:05 ![]()
+ O! r: J2 P3 {( R# a4 u5 ^4 B基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
Q9 x/ Q* w( w9 H6 y
1 s5 G1 T8 h9 }$ R( b- E" ^这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 5 j% t b5 E" d
( W/ [# P9 W0 d" u( ~
结果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)
, z1 B( K- }2 c' e* V( h8 }3 A, h! Q% h1 x% B- _
R example:
6 c* ?+ K8 W3 _4 z$ y/ i& }/ _; X+ ?9 Z1 A% Q, {, c, V* q
> M<-as.table(rbind(c(1668,5173),c(287,930)))
; p9 J% z, z$ j0 _) S* l> chisq.test(M)3 t, `4 p, Z* Y4 |4 r
% c& [' V$ i/ q$ E Pearson's Chi-squared test with Yates' continuity correction
2 s5 S" l: D2 s: }( d& m. L
! f+ E( W( s7 Z3 P% L0 p& }data: M
7 k* m H0 D+ k- E' iX-squared = 0.3175, df = 1, p-value = 0.5731+ {% y: P: q& H; w
! y" }2 S# a; \: vPython example:$ ]1 z0 f P9 t3 q. |" Z" Y
& ?8 O0 B8 G8 V7 B: D. m>>> from scipy import stats7 q1 [0 n( x& f$ w$ x3 `% a
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
1 s, R7 c9 x' K- F! I/ p5 l(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
* b# e! b6 B5 x [ 295.26371308, 921.73628692]])) |
|