|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 - B4 l$ Q9 @ L P; F- N H+ h; W
煮酒正熟 发表于 2013-12-20 12:05 8 J- D7 k8 @; }8 w* r6 ~
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ...
/ a8 ^7 C" C' `6 s7 I8 Q( {& w4 m% P5 d8 S" k) y
这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 7 y; B$ ^# C. w9 r3 i
# N0 O j* m4 A E+ Y/ M8 j结果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)
! X' z3 P) t9 }" @1 |: W
9 J5 B" w, p2 x+ d6 ZR example:+ z0 M! c+ i" M7 L
+ w& D2 K/ K6 m8 l9 g: G9 f( B> M<-as.table(rbind(c(1668,5173),c(287,930)))
1 Q6 p i# i+ m/ l k> chisq.test(M)
) j5 U& d; f7 o$ c9 |" Q; f# U/ U" `- B+ v
Pearson's Chi-squared test with Yates' continuity correction
4 K' m5 C3 @: j2 b& P4 X! A8 d2 i% X2 u/ o% G! k1 \- [
data: M9 @ b3 k; `" {( r, f3 ^
X-squared = 0.3175, df = 1, p-value = 0.5731
) d6 F+ ~" I8 @' Y0 M2 l. U" X% _- F
Python example:
, D) e/ X- B, S: @) |+ V" f3 I; F% z
>>> from scipy import stats( }& @1 L: P5 K9 b" L% u0 S
>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])2 Q' _* j, U& w. |
(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],1 i2 e0 O5 p6 C! J
[ 295.26371308, 921.73628692]])) |
|