|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
( Y9 F8 c* @; b煮酒正熟 发表于 2013-12-20 12:05 ' a2 F+ |( Q8 X& J
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
/ v- g* I" E; z4 G0 [1 E! W8 P+ N$ F" M) P9 ~" ~
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 1 G# b/ k9 u9 ?( H2 k
% D x; Z% U7 L0 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)/ u4 ]% h: S" f3 N+ Q& I, H# N
0 A2 k1 l# l4 B$ C, m# T5 jR example:! i$ K9 _8 l/ i' x' E
# o3 F3 @, L9 i> M<-as.table(rbind(c(1668,5173),c(287,930)))+ Y& @. b6 y( A3 j! \
> chisq.test(M)) u9 q( @# a" x4 ~* l& P, e
! |, C3 `- }- u& Z Pearson's Chi-squared test with Yates' continuity correction$ L- W7 V5 f" c5 f( ]
! A, u- y, E6 G
data: M% N9 [/ y/ F( d4 n% V6 g
X-squared = 0.3175, df = 1, p-value = 0.5731# }! [. T: D' r! X Z
: ~ `0 t' Y8 Y+ ~& L& BPython example:3 W. g' n- o* R2 Q: p2 ?
/ c) _8 x6 x& R1 Q, ]- Z: D
>>> from scipy import stats
1 D; w0 ]& c0 N6 S# r>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])* `) H1 T& a& i5 g- m+ G
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],1 N6 O7 t+ ~" B1 v8 n3 l
[ 295.26371308, 921.73628692]])) |
|