set.seed(123) x = abs(rnorm(100, 10, 5)) xbar = mean(x) print( sprintf("cor(x, x^2)= %3.4f; cor((x-xbar), (x-xbar)^2)= %3.4f", cor(x, x^2), cor(x-xbar, (x-xbar)^2)) ) #postscript("../../WriteUp/Graphics/Chapter2/ex_2_17_plot.eps", onefile=FALSE, horizontal=FALSE) par(mfrow=c(1,2)) plot( x, x^2 ) grid() plot( x-xbar, (x-xbar)^2 ) grid() par(mfrow=c(1,1)) #dev.off()