|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 1 p( h! f) `) N$ n3 [1 I0 c
煮酒正熟 发表于 2013-12-20 12:05
, ?9 b8 i" M9 x( p V! ?8 s基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
8 Z7 Z, I4 L: Q. U+ d( s* r2 \% i& W. G0 L' M! c: D
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
' T- d/ Z3 r' K
7 l2 b- E; ]* c% H7 q6 o' [* P. a7 C2 q结果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)( E7 z+ r2 r; v# O! b. T* P+ O
' N' P' p0 r0 t1 t
R example:
- L k0 G6 H+ T' e3 t1 t9 a3 G
' T+ I! V: D" R' H> M<-as.table(rbind(c(1668,5173),c(287,930))) f8 ]+ I4 x. Z6 a) V9 C
> chisq.test(M)# H# I; o, q* q- ]; P% P
1 ]! f5 d( O. e Pearson's Chi-squared test with Yates' continuity correction+ g I) R. `9 ^* Z! i$ E
! Z3 a9 Y) t9 R% k' Ndata: M0 [1 m6 n. o* g
X-squared = 0.3175, df = 1, p-value = 0.5731/ o0 s" W* E: j& i
. ]5 S8 H+ u* N/ APython example:
2 H1 v8 y8 p! {$ ]# s# M- t6 g% Y; _8 \
>>> from scipy import stats
V+ Y" ^4 Y. o$ u$ a: W N3 C, m& {6 F>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
/ O. S# \6 v2 u9 h; \8 A(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
* c' Y3 o& x; i, M% T1 a% x) M [ 295.26371308, 921.73628692]])) |
|