|
|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 & j% l K0 Z1 S+ j8 ]0 B: Q' r# d
煮酒正熟 发表于 2013-12-20 12:05 ![]()
) I+ D9 d+ C6 ]9 R$ f基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... / e8 D+ Y: r. z8 S: S
S6 f2 n1 f$ r& F2 M9 ~+ V E
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
" ]; f1 ]. D) ^8 H1 q" c3 H0 E/ I, @4 s9 G9 p: M
结果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). {) y" z# a6 J s8 x# m
1 D4 c p4 L; M9 C1 H5 [R example:, U( n) q% Z: X, }7 j, s6 e6 X r
2 M% \; y; Q9 F! |" q) {
> M<-as.table(rbind(c(1668,5173),c(287,930)))
& G8 w4 s3 u v/ U) @$ H- ]2 z> chisq.test(M)2 W* n1 s' A3 O% q' ^1 S
P) Y6 C5 g. J6 [. j/ U( f
Pearson's Chi-squared test with Yates' continuity correction
5 T' W; t; o, p z/ M: C6 h5 l. T$ J( I+ F
data: M, c+ j3 Y; q2 I
X-squared = 0.3175, df = 1, p-value = 0.5731
& F! ~6 o( \- |0 W4 ? \8 c' @7 d9 A& y; Z: g. U
Python example:6 z" u& j$ [) R9 V; X
. d7 O* A7 a4 l>>> from scipy import stats
9 o& _! h- z# }9 i9 n/ ?1 j R. X>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])9 j( D$ z7 h: [) E2 H& N1 S$ E
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
4 O6 [& M8 K: \1 m6 m [ 295.26371308, 921.73628692]])) |
|