r:standard_error
This is an old revision of the document!
Standard deviation:
plot(seq(-3.2,3.2,length=50),dnorm(seq(-3,3,length=50),0,1),type="l",xlab="",ylab="",ylim=c(0,0.5)) segments(x0 = c(-3,3),y0 = c(-1,-1),x1 = c(-3,3),y1=c(1,1)) text(x=0,y=0.45,labels = expression("99.7% of the data within 3" ~ sigma)) arrows(x0=c(-2,2),y0=c(0.45,0.45),x1=c(-3,3),y1=c(0.45,0.45)) segments(x0 = c(-2,2),y0 = c(-1,-1),x1 = c(-2,2),y1=c(0.4,0.4)) text(x=0,y=0.3,labels = expression("95% of the data within 2" ~ sigma)) arrows(x0=c(-1.5,1.5),y0=c(0.3,0.3),x1=c(-2,2),y1=c(0.3,0.3)) segments(x0 = c(-1,1),y0 = c(-1,-1),x1 = c(-1,1),y1=c(0.25,0.25)) text(x=0,y=0.15,labels = expression("68% of the data within 1" * sigma),cex=0.9)
see this blog for about layout of figures
par(mfrow=c(2,2)) x1 <- rnorm(100) x2 <- rnorm(1000) x3 <- rnorm(10000) x4 <- rnorm(100000) hist(x1) hist(x2) hist(x3) hist(x4) par(mfrow=c(1,1))
sex1 <- sd(x1) / sqrt(length(x1)) sex2 <- sd(x2) / sqrt(length(x2)) sex3 <- sd(x3) / sqrt(length(x3)) sex4 <- sd(x4) / sqrt(length(x4)) sex1 sex2 sex3 sex4
r/standard_error.1505347403.txt.gz · Last modified: 2017/09/14 08:33 by hkimscil