I'm finding differences when trying to calculate the CI in R :
x=c(25,30,15,45,22,54)
#IC 1
install.packages("Rmisc")
library(Rmisc)
CI(x,0.95) # [16.30429 ; 47.36238]
#IC2
lclm=mean(x)-(1.96*sd(x)/sqrt(length(x))) #19.99285
Uclm=mean(x)+(1.96*sd(x)/sqrt(length(x))) #43.67382
I want to know why I don't get same intervals with the two ways. Thank you!