Chapter 7. Law of Large Numbers#
Figure 7.1. Limit of a Sequence#
x <- seq(2.7*pi,25.5*pi,by=0.1)
an <- sin(x)/x
n <- length(x)
a <- matrix(0,n,1)
plot(x,an,lty=1,type="l",xaxs="i",yaxs="i",ylab="",xlab="",xlim=c(2.7*pi,26.3*pi),xaxt="n",yaxt="n",bty="n")
lines(x,a,lty=5)
nd <- 14.5*pi
d <- sin(nd)/nd
abline(h=d,lty=2)
abline(h=-d,lty=2)
points(nd,d,pch=19,cex=.8)
text(70,d+.01,expression(a+delta),cex=.75)
text(70,-d-.01,expression(a-delta),cex=.75)
text(nd,d+.01,expression(n[delta]),cex=.75)
nd <- 4.5*pi
d <- sin(nd)/nd
text(nd,d+.01,expression(a[n]),cex=.75)
text(26.1*pi,0,"a",cex=.75)
Figure 7.2. Contintuity#
# Continuous
x <- seq(-.1,2,by=0.01)
f <- exp(x)
c <- 1.25
cL <- c - .2
cU <- c + .2
h <- exp(c)
hL <- exp(cL)
hU <- exp(cU)
wd <- 1.4
plot(x,f,type="l",lty=1,xaxs="i",yaxs="i",ylab="",xlab="",xlim=c(-.5,2),ylim=c(.5,6),xaxt="n",bty="n",yaxt="n",lwd=wd)
abline(h=1,lwd=wd)
abline(v=0,lwd=wd)
text(1.9,5.6,expression(h(x)),cex=.8)
text(c,.62,expression(c),cex=.8)
text(cU,.62,expression(c+delta),cex=.8)
text(cL,.62,expression(c-delta),cex=.8)
points(c,1,pch=19,col="black",cex=.7)
text(cU,1,")",cex=1)
text(cL,1,"(",cex=1)
arrows(c+.1,1,c+.1,exp(c+.1),angle=20,length=.1,lwd=1)
arrows(c-.1,1,c-.1,exp(c-.1),angle=20,length=.1,lwd=1)
arrows(c+.1,exp(c+.1),0,exp(c+.1),angle=20,length=.1,lwd=1)
arrows(c-.1,exp(c-.1),0,exp(c-.1),angle=20,length=.1,lwd=1)
text(-.32,h,expression(h(c)),cex=.8)
text(-.25,h+.77,expression(h(c)+epsilon),cex=.8)
text(-.25,h-.77,expression(h(c)-epsilon),cex=.8)
points(0,h,pch=19,col="black",cex=.7)
text(0,h+.77,"]",srt=90,cex=1)
text(0,h-.77,"[",srt=90,cex=1)
par(xpd=NA)
# Discontinuous
x1 <- seq(-.1,c-.01,.01)
x2 <- seq(c+.01,3,.01)
f1 <- exp(x1)
f2 <- exp(x2) + 1
plot(x1,f1,type="l",lty=1,xaxs="i",yaxs="i",ylab="",xlab="",xlim=c(-.5,2),ylim=c(.5,6),xaxt="n",bty="n",yaxt="n",lwd=wd)
lines(x2,f2)
points(c,h,col="black",cex=.7)
points(c,h+1,col="black",cex=.7,pch=19)
abline(h=1,lwd=wd)
abline(v=0,lwd=wd)
text(c,.62,expression(c),cex=.8)
text(cU,.62,expression(c+delta),cex=.8)
text(cL,.62,expression(c-delta),cex=.8)
points(c,1,pch=19,col="black",cex=.7)
text(cU,1,")",cex=1)
text(cL,1,"(",cex=1)
text(-.32,h,expression(h(c)),cex=.8)
text(-.25,h+.77,expression(h(c)+epsilon),cex=.8)
text(-.25,h-.77,expression(h(c)-epsilon),cex=.8)
points(0,h,pch=19,col="black",cex=.7)
text(0,h+.77,"]",srt=90,cex=1)
text(0,h-.77,"[",srt=90,cex=1)
text(1.7,5.6,expression(h(x)),cex=.8)
arrows(c+.1,1,c+.1,exp(c+.1)+1,angle=20,length=.1,lwd=1)
arrows(c-.1,1,c-.1,exp(c-.1),angle=20,length=.1,lwd=1)
arrows(c+.1,exp(c+.1)+1,0,exp(c+.1)+1,angle=20,length=.1,lwd=1)
arrows(c-.1,exp(c-.1),0,exp(c-.1),angle=20,length=.1,lwd=1)
par(xpd=NA)