|
|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
4 D) b K7 R5 p0 m9 a6 d煮酒正熟 发表于 2013-12-20 12:05 0 f. c5 v5 [% s1 }$ _8 p, T
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
5 Z$ o, `6 C3 {" j7 x0 @. v4 e: h; [" ^" `
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
( \& [7 k3 k' h5 l4 g) g$ |* B7 H F# W
结果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)+ r3 ~! U% ]; s# N
& H8 o( w* |' J/ n
R example:
. Q$ S: p1 t' \. O c( S; ?* H) Y1 [# l y4 t1 U9 `: O/ s1 O
> M<-as.table(rbind(c(1668,5173),c(287,930)))3 M: t# n& x5 ?' u5 Q
> chisq.test(M)5 B3 m3 [0 v0 \9 J- Y4 n7 P
* a: M$ E& ?$ R+ w9 @& A
Pearson's Chi-squared test with Yates' continuity correction
! q7 F, u/ `: Y8 _ r- J( }# F, W0 h- S5 \. y
data: M- @/ A- j8 w9 |9 K- t7 ?! R$ r
X-squared = 0.3175, df = 1, p-value = 0.5731
& ]7 X2 e' n# J2 P" x/ S* j3 _8 x( x) c
Python example:: X! U& ^# k8 w. a4 b9 H% j% G
) K% o, `- l% Y) h0 ?
>>> from scipy import stats: K. W: @6 `# t, _+ [8 q% l$ P
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
9 _' T" A- `7 r! |0 ](0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
+ [1 V8 f0 U+ l" u, S" F; [- V [ 295.26371308, 921.73628692]])) |
|