Basic statistics

first moment business decision

mean & median

a=2
b=3
c=a+b
student <- read.csv("F:\\BA classes\\programs R\\dataset\\student.csv")
attach(student)
mean(G1) # mean of G1
## [1] 10.90886
mean(G2) # mean of G2
## [1] 10.71392
median(G2) # median of G2
## [1] 11

second moment business decision

sd(G2) # standard deviation of G2
## [1] 3.761505
var(G2) # variance of G2
## [1] 14.14892
sd(G1) # standard deviation G1
## [1] 3.319195
var(G1) # variance G1
## [1] 11.01705

third moment business decision

hist(G2)

library(e1071)
skewness(G1)
## [1] 0.2387889
kurtosis(G2)
## [1] 0.5864084
skewness(G2)
## [1] -0.4283726
hist(G1)

kurtosis(G1)
## [1] -0.7118591
barplot(G1)