normalitas = read.csv(file.choose())
if (ncol(normalitas) == 1) normalitas = read.csv2(file.choose())
x = normalitas[,1]
x = as.numeric(gsub(",", ".", as.character(x)))
x = na.omit(x)
summary(x)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 40 60 70 70 80 100
library(nortest)
lillie.test(x)
##
## Lilliefors (Kolmogorov-Smirnov) normality test
##
## data: x
## D = 0.125, p-value = 0.7235
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