
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

1. A linear statistical model
Let β 0 = 2, β 1 = 1 and assume the followig relation holds true
Y = β 0 + β 1 x + ,
where x ∈ [0 , 10], and ∼ N (0 , σ^2 ), with σ^2 = 1.
The following R code generates 100 observations from the statistical model above. Then the data points are plotted as well as the true linear model.
set.seed (123) x= seq (0,10,length.out=100) f=2+x Y=f+ rnorm (100) plot (x,Y) abline (2,1,col=2)