Question: Data set: x -3 -2 -1 0 1 2 3 y 9 4 1 0 1 4 9 we generate the random value i in
Data set:
| x | -3 | -2 | -1 | 0 | 1 | 2 | 3 |
| y | 9 | 4 | 1 | 0 | 1 | 4 | 9 |
we generate the random value i in Equation (1) differently. This time, choose i uniformly at random in the interval [1 + x2i ,
1 + x2i ].
Equation (1) ---> yi = xi + + i,
a) Find the best fitting line using linear regression with x as predictor and y response. What is the intercept and slope? How do you think the error scales with the amount of data in this case?
b) Now, find the best fitting line using linear regression with x2 as predictor and y response. What is the intercept and slope? Plot out the data points along with the linear relationship you learned versus the true one.
c)For this growing data set, do our predictions keep getting better if we have more data? Use your answers to the previous question to explain your intuition for why this is the case.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
