|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
8 W. V% _8 a& X; _4 |0 s# J煮酒正熟 发表于 2013-12-20 12:05 8 N: i2 Y. t* s# \2 Y
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
' d/ E* d. g% i$ O
, p* A& h( R9 i* W w4 ?这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 " g2 m l0 u" u
1 q3 L3 m% T; [9 P! D$ Z5 P结果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)$ v( i, g% D9 V7 e8 @5 d
6 \+ }, M8 u, J- W5 |. A* wR example: I+ U# P) O; f" X
* [6 w5 F) f2 u; W) i> M<-as.table(rbind(c(1668,5173),c(287,930)))0 R( v1 a. y, u' d
> chisq.test(M): q- J: S! I/ F. Z0 C0 U' m! ?
) {' e$ r) b( k0 \- H c Pearson's Chi-squared test with Yates' continuity correction) e: M. b% C1 e: k0 Z4 l/ b
$ h! X" a6 ~1 F* Ndata: M
$ G9 ~- F0 g. R# N+ |X-squared = 0.3175, df = 1, p-value = 0.5731
: L- ~$ x: K8 k- x) N: L0 H0 |4 H
Python example:
) [4 W, p/ g, E$ s0 A# y
0 U6 M9 S* K a$ W1 G4 f>>> from scipy import stats
4 Y6 w) V/ G4 v>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
( x0 }) u9 w6 S2 V) Q(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],; F6 L- ]- R! y9 o& n) s' x! g
[ 295.26371308, 921.73628692]])) |
|