x <- c(40, 50, 50, 60, 60, 60, 70, 70, 70, 70, 80, 80, 80, 90, 90, 100)
library(e1071)
a <- moment(x, order=2, center=TRUE)
b <- moment(x, order=4, center=TRUE)
a
## [1] 250
b
## [1] 145000
c <- a^2
c
## [1] 62500
kurtosis <- b/c
kurtosis
## [1] 2.32
library(tseries)
## Registered S3 method overwritten by 'quantmod':
##   method            from
##   as.zoo.data.frame zoo
jarque.bera.test(x)
## 
##  Jarque Bera Test
## 
## data:  x
## X-squared = 0.30827, df = 2, p-value = 0.8572
qqnorm(x)
qqline(x, col = "red")

# Membuat histogram dengan garis kurva atau warna biru
hist(x, 
     main = "Histogram & Uji Normalitas", 
     xlab = "Data", 
     col = "lightblue", 
     border = "black")