load('/Users/milin/男性为什么下降了/支付方式调整对取消率的影响.Rdata')
划分到时间的结果如下:
Cresult
## 时间 0组的取消率 1组的取消率 2组的取消率 3组的取消率 0组的订单量
## 1 2018-06-17 0.3703704 0.2647059 0.05263158 0.2187500 27
## 2 2018-06-20 0.3750000 0.1979167 0.20481928 0.1300813 120
## 3 2018-06-25 0.3812950 0.3402778 0.27027027 0.2388060 139
## 4 2018-06-23 0.3426966 0.3061224 0.23214286 0.2085890 178
## 5 2018-06-29 0.4324324 0.4352941 0.25000000 0.2727273 74
## 6 2018-06-18 0.2608696 0.3571429 0.30434783 0.2727273 23
## 7 2018-06-26 0.3440000 0.2828947 0.21276596 0.2040816 125
## 8 2018-06-22 0.3673469 0.3013699 0.24203822 0.2008929 196
## 9 2018-06-27 0.2363636 0.2676056 0.25000000 0.1834862 110
## 10 2018-06-24 0.3411765 0.3081761 0.19834711 0.2321429 170
## 11 2018-06-21 0.3253968 0.3985507 0.25000000 0.1764706 126
## 12 2018-06-28 0.3369565 0.2888889 0.25675676 0.1666667 92
## 13 2018-06-19 0.2962963 0.2800000 0.28000000 0.3055556 27
## 14 2018-06-16 0.3157895 0.3043478 0.31250000 0.3809524 19
## 15 2018-06-30 0.3818182 0.3909091 0.32432432 0.2600000 110
## 16 2018-06-15 0.3529412 0.3529412 0.23809524 0.3333333 17
## 1组的订单来那个 2组的订单量 3组的订单量
## 1 34 19 32
## 2 96 83 123
## 3 144 111 134
## 4 147 112 163
## 5 85 48 88
## 6 28 23 22
## 7 152 94 147
## 8 219 157 224
## 9 142 84 109
## 10 159 121 168
## 11 138 92 119
## 12 90 74 84
## 13 25 25 36
## 14 23 16 21
## 15 110 74 100
## 16 17 21 21
library(ggplot2)
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
p <-
ggplot(Cresult1, aes(x = 时间 , y = cancelr , color = type)) + geom_line()
p <- p+theme(text = element_text(family = 'STKaiti'))
ggplotly(p)
t.test(Cresult$`0组的取消率`,Cresult$`1组的取消率`)
##
## Welch Two Sample t-test
##
## data: Cresult$`0组的取消率` and Cresult$`1组的取消率`
## t = 1.2549, df = 28.778, p-value = 0.2196
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.01511340 0.06306411
## sample estimates:
## mean of x mean of y
## 0.3412968 0.3173215
t.test(Cresult$`0组的取消率`,Cresult$`2组的取消率`)
##
## Welch Two Sample t-test
##
## data: Cresult$`0组的取消率` and Cresult$`2组的取消率`
## t = 5.0171, df = 28.189, p-value = 2.601e-05
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.05850729 0.13920647
## sample estimates:
## mean of x mean of y
## 0.3412968 0.2424400
t.test(Cresult$`0组的取消率`,Cresult$`3组的取消率`)
##
## Welch Two Sample t-test
##
## data: Cresult$`0组的取消率` and Cresult$`3组的取消率`
## t = 5.1554, df = 27.56, p-value = 1.895e-05
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.06308028 0.14635555
## sample estimates:
## mean of x mean of y
## 0.3412968 0.2365789
t.test(Cresult$`1组的取消率`,Cresult$`2组的取消率`)
##
## Welch Two Sample t-test
##
## data: Cresult$`1组的取消率` and Cresult$`2组的取消率`
## t = 3.4783, df = 29.925, p-value = 0.001568
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.03091101 0.11885204
## sample estimates:
## mean of x mean of y
## 0.3173215 0.2424400
t.test(Cresult$`1组的取消率`,Cresult$`3组的取消率`)
##
## Welch Two Sample t-test
##
## data: Cresult$`1组的取消率` and Cresult$`3组的取消率`
## t = 3.6558, df = 29.718, p-value = 0.0009836
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.03561894 0.12586617
## sample estimates:
## mean of x mean of y
## 0.3173215 0.2365789
t.test(Cresult$`2组的取消率`,Cresult$`3组的取消率`)
##
## Welch Two Sample t-test
##
## data: Cresult$`2组的取消率` and Cresult$`3组的取消率`
## t = 0.25927, df = 29.932, p-value = 0.7972
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.04030989 0.05203196
## sample estimates:
## mean of x mean of y
## 0.2424400 0.2365789