|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑
# U) E3 Z5 q: {, S3 y煮酒正熟 发表于 2013-12-20 12:05
5 P: K2 B9 v7 S% O' d基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... 9 c7 G% { Q; Z# g7 [9 m6 `
/ J% K3 [: ^& E: K6 ]4 A这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 ) v3 c4 r9 I- M0 {9 V
% h0 r. Y, _1 }- p结果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)" w/ {0 U: ~1 v3 t1 m7 P
8 O) P! X. ]' q' N
R example:
$ d8 M* B: S! Q5 l/ X4 L" N0 |: q4 j4 i. D5 Q" o$ Q
> M<-as.table(rbind(c(1668,5173),c(287,930)))- l7 G+ b& E& _( c8 r$ ~- L& B
> chisq.test(M)! h& `1 p" n! C4 }. S# @- @
* Q* C' _ Q$ V+ @$ M Pearson's Chi-squared test with Yates' continuity correction! h" l& Y! e1 }1 ^1 g) F
7 S. H0 r5 f7 Vdata: M
2 w- Z5 y- q) y$ ?- }X-squared = 0.3175, df = 1, p-value = 0.5731' T* |4 B! X8 n* U6 B, f5 [$ K
9 n1 V. c/ z, u& a6 Q) cPython example:
& Y# d7 }( e$ | B
' p# z( P2 t/ \>>> from scipy import stats
3 |# S6 b. k8 A+ l" `>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
3 Z0 I( M0 s3 n/ v( ^0 r+ o8 ? {( [(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
3 U$ O' t K6 c9 x" v% l$ Z [ 295.26371308, 921.73628692]])) |
|