data_berpasangan = read.table(file.choose(), header = TRUE)
View(data_berpasangan)

t.test(data_berpasangan$y, data_berpasangan$x, paired = TRUE)
## 
##  Paired t-test
## 
## data:  data_berpasangan$y and data_berpasangan$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
selisih = data_berpasangan$y - data_berpasangan$x
selisih
## [1] 22 20  3 13 20 18 11 16 23
qqnorm(selisih)
qqline(selisih)

library(nortest)
lillie.test(selisih)
## 
##  Lilliefors (Kolmogorov-Smirnov) normality test
## 
## data:  selisih
## D = 0.1682, p-value = 0.6544
library(tseries)
## Registered S3 method overwritten by 'quantmod':
##   method            from
##   as.zoo.data.frame zoo
jarque.bera.test(selisih)
## 
##  Jarque Bera Test
## 
## data:  selisih
## X-squared = 1.3935, df = 2, p-value = 0.4982