|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
+ r. H( U- q* R8 _, i0 m2 f7 ]煮酒正熟 发表于 2013-12-20 12:05 * Y; D) y) m8 k% W5 H3 H* [
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... . @7 N7 J& }% Y* ~* k
6 A K! f+ e5 m7 c这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 * [( W$ _* V# m% E4 w! J
# h4 [3 |0 N) s/ }: F2 I. y4 l! Y结果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)
2 X, C( Q9 B3 Z4 h& R+ Z/ X9 W7 z: `+ Z- Y# @: t, @5 t4 m
R example:
. q3 A2 \6 u7 _6 P# X$ }& i6 ?, O$ |; B% m6 v) y
> M<-as.table(rbind(c(1668,5173),c(287,930)))
$ c( T Y+ k# I: Z- L> chisq.test(M)
$ t; K+ P' L+ Y3 Z0 c3 d+ x$ o" d4 D' m2 u: G
Pearson's Chi-squared test with Yates' continuity correction
- s; q) [3 B7 j/ `6 H" k7 H! G! w; |- T& ~
data: M
4 Y, k' R9 X9 e; F) o6 oX-squared = 0.3175, df = 1, p-value = 0.57319 g2 I8 A) i! _* |. U2 O( y
% R* k: n! @1 }/ v! l+ FPython example:
7 C' \/ F' l' n5 L0 `" P! F4 z+ |. i) ~7 [
>>> from scipy import stats
3 Z& W# n) r8 C>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
/ t/ u2 o" R+ j7 p( y(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],5 y# i o' c' U. m! E
[ 295.26371308, 921.73628692]])) |
|