|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
/ I! D: s& i" H2 u7 X Z' Z煮酒正熟 发表于 2013-12-20 12:05 0 I2 u. ~* }: y* r
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
9 _# h+ ~* ], W1 ^0 P0 }% W* } O# B
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
& ^9 ]0 N' ]7 h# V! f
# J, F+ U% C9 E4 f' F7 n9 Y! E" 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)
& m/ o7 u: m' S( J3 t
" V- Y3 t& h3 f5 W& LR example:
- b! `! d* c4 E5 t5 B: o( n; f3 \9 l3 ~* k2 Y1 M
> M<-as.table(rbind(c(1668,5173),c(287,930)))3 O/ A; j j) G
> chisq.test(M)! I! o. \$ j" S" ]
9 b1 ^: R, P7 T
Pearson's Chi-squared test with Yates' continuity correction
8 H% [7 f; U+ s5 ?5 E4 h
$ \5 M+ J7 M% s4 Kdata: M
! B, k* I H6 ~X-squared = 0.3175, df = 1, p-value = 0.5731
: Y* n0 A; e) Q0 O8 u
K* `5 Z/ S6 k! k- NPython example:+ B' H( M, f& Z& h; U* a! _: K5 f; p. y& H
/ E3 O$ b) h5 S' V+ }>>> from scipy import stats
& _& ^9 D- e! D- A% [4 g* T/ X>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])! }( q* m" E2 M. T" L8 f
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
; a* u, U4 \4 \/ f9 e1 O [ 295.26371308, 921.73628692]])) |
|