One day before your Statistics exam, you want to practice fitting a linear regression model by hand. You see the following toy dataset in your textbook:
| Example | |||
| 1 | 2 | 5 | 1 |
| 2 | 3 | 5 | 1 |
| 3 | 4 | 7 | 3 |
Based on this data, you want to fit a model as follows:
.
Estimate the optimal values of the model coefficients and based on the least-squares method.
Enter the obtained values of and divided by space. For example, if you get
your answer should be 0.2 -3 12.
You can use one of the online matrix calculators, for example https://matrixcalc.org, or your favorite programming language for matrix calculations.
Tip: The exact formula to compute the optimal values of a linear regression model is as follows: