|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 5 ^: f! h/ T! s# }7 h0 }
煮酒正熟 发表于 2013-12-20 12:05 % S0 R" D4 F( d
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
# u- l1 `$ X5 h p; X+ c3 K3 P
; i5 a2 n+ t; @/ f% D6 U这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
( c& E: L) {2 M7 p
0 H6 `' K2 ^1 w结果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)8 b1 W4 L( u# t! e/ t+ j3 t
6 y$ F+ P* }, xR example:
) I8 I( p6 r" Y6 h# C$ x5 x- G# z2 A0 S# p& u* K
> M<-as.table(rbind(c(1668,5173),c(287,930)))8 E. @4 ?( p3 d5 ]
> chisq.test(M)
4 z: p; X p! V J6 G" ~0 S; W7 |$ ]3 q: [4 S4 i
Pearson's Chi-squared test with Yates' continuity correction
( a# ]3 T+ o+ y1 x. R& W* A
/ ?9 I/ o- h! n$ Rdata: M9 P; y6 {: a1 |- h5 c- g" I
X-squared = 0.3175, df = 1, p-value = 0.5731
- f* |4 d# n+ N5 n1 p; l8 |' ]7 L* U# |' r* l, A+ H- H7 U1 k2 m
Python example:; w7 S/ t5 h; _" d
6 _. v! j2 a" i; z* c>>> from scipy import stats* q- F' O9 L8 h7 n1 a8 V' [" Z
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])2 e3 F! T% i+ i% ~+ J7 N9 s; I
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
% e0 ?; p& {- C: N; t2 w [ 295.26371308, 921.73628692]])) |
|