I am trying to calculate sd using formula shew<-(sum((x-kl)^2))/(t-1) but result is wrong. I have tried calculating sd using SD function and result is different. can anyone help.
IndexStart <- 1
x <- seq(IndexStart, 6, 1)
x
t<-6
xm <- 1
kl<-mean(x)
kl
n<-sd(x)
n
shew<-(sum((x-kl)^2))/(t-1)