|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
9 m% N- @; i4 F9 \7 V煮酒正熟 发表于 2013-12-20 12:05 `4 r* a3 @- D6 X
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
- x) {1 W. [+ \5 U: ?0 l/ E5 `( g; d
# o/ m+ X/ c; K6 q8 |这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 8 `! r- n; _2 ^+ O) h- n2 O+ f# f4 o
0 A! o9 ?$ [% v" q' d% ?
结果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); O, h: F1 o- j7 y- I8 U
7 p# U- x5 I. j
R example:% p) K5 N/ S' s1 U; a
& y9 S8 `$ J4 v8 w& A> M<-as.table(rbind(c(1668,5173),c(287,930)))( ~4 P* ]) ?) a6 N! h* `% Q
> chisq.test(M)( {2 i( i9 A$ V- P. M0 a4 d7 l
7 v1 B7 L0 ]% Q5 U9 J& M7 y I# J
Pearson's Chi-squared test with Yates' continuity correction- F6 H6 g5 ]( J' [& A
$ m4 c1 t1 O i! J
data: M
" u: ~8 Z' o; I0 c0 W: B rX-squared = 0.3175, df = 1, p-value = 0.5731/ s4 w, z' F, O3 M9 P
/ q8 Z3 S& I8 U \/ c/ `) M
Python example:9 K m' s u) S6 T# p( R
, s2 w! |0 G/ P
>>> from scipy import stats
; p: W; S: Q9 ?, |; }4 q2 X>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])+ W; v7 K. A0 M3 t
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
( p, ~+ Z* |8 R- Z/ i, H" h [ 295.26371308, 921.73628692]])) |
|