Chebyshev inequality diagram: central interval and tail versions.
> png("txebixev_01.png")
> plot.new()
> par(bty="l")
> par(mfrow=c(2,1))
> par(mar=c(5.1,4.1,0.1,2.1))
> par(oma=c(0,0,4,0))
> cord.x <- c(-3,seq(-3,-1.5,0.01),-1.5)
> cord.y <- c(0.01,dnorm(seq(-3,-1.5,0.01)),0.01)
> curve(dnorm(x,0,1),xlim=c(-3,3),yaxs="i",xaxt="n",yaxt="n",
xlab=expression
(paste("P[",group("|",list(x-mu),"|") >= epsilon,"]" <= sigma^2/epsilon^2)),ylab="")
> polygon(cord.x,cord.y,col='skyblue')
> cord.x <- c(1.5,seq(1.5,3,0.01),3)
> cord.y <- c(0.01,dnorm(seq(1.5,3,0.01)),0.01)
> polygon(cord.x,cord.y,col='skyblue')
> a=c(0,0)
> b=c(0,dnorm(0))
> lines(a,b)
> axis(1,at=c(0),labels=c(expression(mu)))
> arrows(x0=-1.5,y0=0.09,x1=0,y1=0.09,code=3,length=0.1,lwd=1)
> arrows(x0=0,y0=0.09,x1=1.5,y1=0.09,code=3,length=0.1,lwd=1)
> text(-0.75,0.045,expression(epsilon))
> text(0.75,0.045,expression(epsilon))
> curve(dnorm(x,0,1),xlim=c(-3,3),yaxs="i",xaxt="n",yaxt="n",xlab=expression
(paste("P[",group("|",list(x-mu),"|") < epsilon,"]",">
1-",sigma^2/epsilon^2)),ylab="")
> cord.x <- c(-1.5,seq(-1.5,1.5,0.01),1.5)
> cord.y <- c(0.01,dnorm(seq(-1.5,1.5,0.01)),0.01)
> polygon(cord.x,cord.y,col='skyblue')
> a=c(0,0)
> b=c(0,dnorm(0))
> lines(a,b)
> axis(1,at=c(0),labels=c(expression(mu)))
> arrows(x0=-1.5,y0=0.09,x1=0,y1=0.09,code=3,length=0.1,lwd=1)
> arrows(x0=0,y0=0.09,x1=1.5,y1=0.09,code=3,length=0.1,lwd=1)
> text(-0.75,0.045,expression(epsilon))
> text(0.75,0.045,expression(epsilon))
> dev.off()