第 5 章 AB-test
## [1] 111.4
## [1] 91.05
Code

##
## Welch Two Sample t-test
##
## data: x and y
## t = -3.5, df = 198, p-value = 6e-04
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -2.9923 -0.8392
## sample estimates:
## mean of x mean of y
## 99.8 101.7
##
## Paired t-test
##
## data: x and y
## t = -17, df = 99, p-value <2e-16
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -2.137 -1.694
## sample estimates:
## mean difference
## -1.916
##
## Welch Two Sample t-test
##
## data: y and x
## t = 3.5, df = 198, p-value = 6e-04
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.8392 2.9923
## sample estimates:
## mean of x mean of y
## 101.7 99.8
Code
## Difference between Two means
## (Independent Samples t Test)
## H0: mu1 = mu2
## HA: mu1 < mu2
## ------------------------------
## Statistical power = 0.8
## n1 = 51
## n2 = 51
## ------------------------------
## Alternative = "less"
## Degrees of freedom = 100
## Non-centrality parameter = -2.506
## Type I error rate = 0.05
## Type II error rate = 0.2

重复测量Repeated-Measure Design
集群随机化Cluster Randomization
差中差估计Difference in Differences