|
|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 6 H) c/ @, J7 ^7 f( f& |. Z
煮酒正熟 发表于 2013-12-20 12:05 0 S! ^) l% e8 g" P# W
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... 5 ?/ l) |' g5 ~+ a! r7 {9 [/ E
" M* ~+ g# M K7 d. v1 Y, l0 o这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。
" w% w* a( n7 F1 B$ D/ Y
8 B# Y) A1 {3 |4 m) j0 W1 C5 V结果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)
& B, @* Q5 p$ C% y
7 L+ y4 K6 u( y2 Z8 s! _R example:/ ~0 J9 l( z9 I6 e
8 C; W/ t% a- B( q> M<-as.table(rbind(c(1668,5173),c(287,930)))
( G' ?+ b- _& K8 `> chisq.test(M). ?$ c6 A8 j/ Y
" O/ O7 u8 ^7 m Pearson's Chi-squared test with Yates' continuity correction
: M# X' b5 d; G
. j) J& U5 k: l1 u1 N# Rdata: M
* [4 e" ?) C2 L ^2 f: d7 K5 D0 bX-squared = 0.3175, df = 1, p-value = 0.5731+ c* N" m2 B' z8 e
- a2 a# I7 H- zPython example:' N) x( n4 N" I% Y' H
- ~: f8 s( Q9 z! I6 D, O& g* G) V
>>> from scipy import stats6 ]7 Y' r7 @7 C) r, U
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])2 p* B V* E! A+ V: ?2 D x8 _
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308], L! b, f6 F' S5 Z# F
[ 295.26371308, 921.73628692]])) |
|