|
|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 6 n- v* \% S% O( F+ W
煮酒正熟 发表于 2013-12-20 12:05 $ _! |0 R3 ?- T8 q+ c5 ]
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
4 ^" {4 ~# `3 c# r) r4 F3 D* _! n
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 - U9 g# L- E# }: G2 Q$ }# k
+ v9 |% N1 I* a0 i% U* t
结果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)) t7 I" G# W8 @( I$ a t1 [; Z6 R
+ S3 d- F* x h0 \% S' g
R example:3 t7 Y: ~) g& Y/ @+ A( i
: ]5 W2 C% f. W+ g; w1 v+ t8 b
> M<-as.table(rbind(c(1668,5173),c(287,930)))3 d5 ?& x( X$ z& F* T
> chisq.test(M)
4 l V# U9 V) t, N+ k
5 a+ P7 [" P" S. z8 l$ \; ^' |8 k0 J Pearson's Chi-squared test with Yates' continuity correction
5 A1 _% c# I5 S
( Z: B# _4 @- _9 d8 Pdata: M
1 ^5 U" s C! @" BX-squared = 0.3175, df = 1, p-value = 0.57312 C P: ]7 |4 `' ~
% C/ `9 N7 l/ m) m: }8 @0 x0 ?Python example:) g n- p1 r% C9 |2 b/ ~
( Y/ u: ]( b! [5 b. J5 p7 X- @5 G>>> from scipy import stats2 n: T) s) L4 L* l
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])4 J) l! N8 |7 V1 H) T
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],4 S% g- u# G; k' w9 E
[ 295.26371308, 921.73628692]])) |
|