|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 + f+ F, b- b/ q$ I4 a9 R0 N: x8 `
煮酒正熟 发表于 2013-12-20 12:05 + Q1 [' V$ g& f
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
# m9 d0 U' o/ }2 b& Y a% w, J( D( o/ p) |1 D. D6 M
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
; z" w, Q( d/ [1 T0 L8 H
( k2 Z5 X( A, e2 J5 Z, 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)
# p# ]# z; F- N
F. B) ?% n' S5 _# H2 o/ ]8 cR example:1 D0 Y8 O9 i( p
\3 I# N, G" _8 y$ [2 F# [> M<-as.table(rbind(c(1668,5173),c(287,930)))* t' Z& n) x( J$ n6 x; w& i, S d. E
> chisq.test(M)
$ P6 O; W% G4 X$ _- F$ E$ c4 c# | m+ v9 x; _* z# p9 Y+ N. V
Pearson's Chi-squared test with Yates' continuity correction8 y7 K4 d) Z3 F: M9 G; x
- _$ l2 R0 G9 v! K& u6 v* J
data: M
, ^& N0 n1 Z/ @3 X2 f9 p# WX-squared = 0.3175, df = 1, p-value = 0.57314 m& ?7 O, t1 f. n' b
; n/ G% M. S5 S. k% g9 g8 s. mPython example:! m9 J. g4 ?" ?
4 n, y! z" | j# Z* S7 t, o# p4 U
>>> from scipy import stats7 q; i3 ^( @, ]+ }' `# Y% | l
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
q& ~' F6 f b7 n) ]% T(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
3 [$ m- ]! d% H ^3 _ [ 295.26371308, 921.73628692]])) |
|