data=read.csv("C:/Tugas Statistika/data_berpasangan.csv", sep=";")
data
## x y
## 1 78 100
## 2 75 95
## 3 67 70
## 4 77 90
## 5 70 90
## 6 72 90
## 7 78 89
## 8 74 90
## 9 77 100
t.test(data$y, data$x, paired=TRUE)
##
## Paired t-test
##
## data: data$y and data$x
## t = 7.6525, df = 8, p-value = 6.003e-05
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 11.33381 21.11064
## sample estimates:
## mean difference
## 16.22222