\begin{Schunk}
\begin{Sinput}
 N <- 25; stde <- 3; b <- -1.0
 x <- rnorm(N, m=50, sd=10)
 x <- x[order(x)]
 y <- 0.3 + b*x + rnorm(N, m=0, sd=stde)
 mx <- round(mean(x),2)
 my <- round(mean(y),2)
 rx <- range(x)
 ry <- range(y)
 plot(x,y, main="")
 abline(h=my, lty=4, col="black")
 abline(v=mx, lty=4, col="black")
 mtext(bquote(bar(x) ==.(mx)), side=1, line=2, at=mx)
 mtext(bquote(bar(y) ==.(my)), side=2, line=2, at=my)
 text(.9*rx[2],ry[2],pos=1, paste("Cov[x,y]=",round(cov(x,y),2),"\n r=", round(cor(x,y),2)))
\end{Sinput}
\end{Schunk}
