GATE 2025 DA – Question 34
Given data $\{(-1, 1), (2, -5), (3, 5)\}$ of the form $(x, y)$, we fit a model $y = wx$ using linear least-squares regression. The optimal value of $w$ is ______ (*Round off to three decimal places*)
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: 0.276 to 0.296
Explanation
For the model $y = wx$ with no intercept, minimising $\sum (y_i - wx_i)^2$ gives $w = \frac{\sum x_iy_i}{\sum x_i^2}$. Here $\sum x_iy_i = (-1)(1) + (2)(-5) + (3)(5) = -1 - 10 + 15 = 4$ and $\sum x_i^2 = 1 + 4 + 9 = 14$. So $w = \frac{4}{14} = 0.286$.