|
|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
: _1 {* W4 s# O0 x煮酒正熟 发表于 2013-12-20 12:05 ![]()
0 _* ]* |0 l4 D+ ?7 }基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
# G8 }9 w, y: u$ a$ N! p$ M. d* I& I+ w
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
$ d k. ^# g6 T% r
& C0 b! X6 L3 d+ M$ V0 N结果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 d! h" n/ L; d9 [, I) v. O
& k( ` A p" i6 m$ {: UR example:
, h' ~3 K5 w: g4 y) K+ i' H+ E5 J+ b- A% ~
> M<-as.table(rbind(c(1668,5173),c(287,930)))& u9 U( e1 A; D- }
> chisq.test(M)
$ ?4 l3 _6 P( `: q0 ^
( k2 ^$ G. s5 o; @$ d9 K Pearson's Chi-squared test with Yates' continuity correction3 n! ? @4 W% H
2 c. @# b7 y( ?" j0 ]
data: M5 m2 e! _$ ~0 W# _2 P
X-squared = 0.3175, df = 1, p-value = 0.5731/ ?* B# u. B1 l+ @( [4 }
1 w8 i5 l6 ^' [5 e+ F
Python example:- c* f' s* B1 d, S: ] B" A8 y# n
[; H; Z0 n: Q/ |4 B0 D>>> from scipy import stats5 e: X; Q0 f5 q$ u( h4 Z
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])' P B6 j' C3 _% Y6 T2 _
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
; @4 o7 \* R1 t1 r$ M, i [ 295.26371308, 921.73628692]])) |
|