|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 3 Z" d: X8 E* o/ ~4 d
煮酒正熟 发表于 2013-12-20 12:05 ![]()
+ s0 [# R0 i3 |" @基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
/ X. K# u9 X7 c: O; S9 e2 a M+ A$ \" n0 G1 Q2 w8 s) L7 y, U' ?
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 / R7 ]+ A w; g
) N5 T; S& e+ s& v" H* w; f, [& C
结果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 { @8 d: V$ j1 O3 e# a- N2 [ G. f
, n. G$ b7 X! w* U5 {, @7 V5 gR example:5 P3 Z) S& D) e( f7 @
7 L8 @7 B* p; A2 @$ ^> M<-as.table(rbind(c(1668,5173),c(287,930)))
# H+ O( _; i; r2 @& U" b> chisq.test(M)0 g! r7 h5 T/ r2 P! b9 |5 G
8 h& f; \/ p6 M Pearson's Chi-squared test with Yates' continuity correction! t9 p- d) Y0 b. C$ A
! H/ t8 W7 Z! s: j1 N
data: M0 F7 `: n; `' L
X-squared = 0.3175, df = 1, p-value = 0.57313 Z- b+ y# K0 ]7 y
* O" E J* c/ F% [9 oPython example:
2 j( H) {6 E; t( q8 i) g4 F) f! P1 ^" f U' Z
>>> from scipy import stats
( k$ k5 A0 P+ V8 @' b% }>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])* i+ b8 D* d7 L
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],) V0 F- ~" u6 l* S3 u
[ 295.26371308, 921.73628692]])) |
|