|
|
本帖最后由 Menuett 于 2013-12-22 15:59 编辑 5 J$ Q7 m5 h% L4 z+ |7 }
煮酒正熟 发表于 2013-12-20 12:05 . P# n- M2 a" u3 Y1 [
基本可以说是显著的。总的来说,在商界做统计学分析,95%信心水平是用得最多的,当95%上不显著时,都会去 ... 5 n& b6 L" x4 K( h$ C+ n
5 S* Z, R0 w/ M" \这个其实是一种binomial response,应该用Contigency Table或者Logisitic Regression(In case there are cofactors)来做。只记比率丢弃了Number of trial的信息(6841和1217个客户)。 5 L2 }2 d6 R9 ]- L5 G
& w& y( B# G3 l) T( S" O
结果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)0 O8 d8 c8 G' c
: l+ C, B+ K2 m
R example:
1 a7 {; Q2 m9 u/ S% y; m" V
6 F) ?# n6 V6 Y7 E$ s> M<-as.table(rbind(c(1668,5173),c(287,930)))
, g) d: T# S0 ~& v# t g8 N> chisq.test(M), H7 ]. M: M9 {% `/ U0 k! w# T' }
. K7 Z. L+ i* h& v; r) H1 `; `
Pearson's Chi-squared test with Yates' continuity correction$ b" A: _( g7 T/ P; b/ _
( F' F6 X6 y/ ^0 Z0 g3 ^3 v
data: M
! [, D u: w3 gX-squared = 0.3175, df = 1, p-value = 0.5731
K+ ]# B& @( Z2 D) q8 X$ y
/ l" G% F9 H9 u) t9 _Python example:
' s9 U S7 N5 ?: y! \2 p" _, X; ?; m0 k7 ^" m
>>> from scipy import stats
, T, T4 N# n# d>>> stats.chi2_contingency([[6841-5173,5173],[1217-930,930]])
/ B% n- F' g7 X2 u( j7 B \(0.31748297614660292, 0.57312422493552839, 1, array([[ 1659.73628692, 5181.26371308],
7 P' P) Q: V8 |$ y9 q [ 295.26371308, 921.73628692]])) |
|