The GATE Grind

GATE 2026 CH – Question 63

Engineering Mathematics · Fundamentals of AI/ML: Linear regression and principal component analysis · 2 marks · Numerical answer

The data given in the table are fitted to the equation $y = mx$ using the method of least squares. The value of $m$ is ______ (rounded off to one decimal place).

$x$1234
$y$26710

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 2.49 to 2.51

Explanation

For a line through the origin, minimising $\sum(y - mx)^2$ gives $m = \frac{\sum xy}{\sum x^2}$. Here $\sum xy = 2 + 12 + 21 + 40 = 75$ and $\sum x^2 = 1 + 4 + 9 + 16 = 30$, so $m = \frac{75}{30} = 2.5$.