In this exercise you will create some simulated data and will fit simplelinear regression models to it.Make sure to use set.seed(1) prior tostarting part (a) to ensure consistent results.
set.seed(1)
a)Using the rnorm() function, create a vector, x, containing 100observations drawn from a N(0,1) distribution.This representsa feature, X.
# Create a vector x containing 100 observations from N(0,1)
x <- rnorm(100, mean = 0, sd = 1)
(b)Using the rnorm() function, create a vector, eps, containing 100observations drawn from a N(0,0.25) distribution-a normaldistribution with mean zero and variance 0.25.
# Create a vecto