Fig. 1

[[[FIG_OPTIONS]]] height=300,width=600 [[[SET_GLOBAL]]] x,y
x = rnorm(30)
n = length(x)
y = -1 + 3*x+rnorm(n,0,1)
par(mfrow=c(1,2))
qqnorm(x)
plot(x,y)
cor(x,y)
Answer: .

Fig. 2

[[[FIG_OPTIONS]]]height=400,width=400
n=1000
x=rnorm(n,0,1)
y = {{m}}*x + rnorm(n,0,{{s}})
plot(x,y)
cor(x,y)
m = s =

The linear correlation coefficient is .

Experiment

options(digits=12)
cor(x,y)
Corr(x,y) = .
set.seed(strftime(Sys.time(), format="%H%M%S") )
x = rnorm(5)
sd(x)
The std dev is .