Skip to content
GATEiit

GATE DA 2025 Q34: Least squares through the origin: fit y = wx

Question

Given data {(−1,1),(2,−5),(3,5)}\{(-1, 1), (2, -5), (3, 5)\} of the form (x,y)(x, y), we fit a model y=wxy = wx using linear least-squares regression. The optimal value of ww is ____ (Round off to three decimal places)

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 0.285 to 0.287 (official GATE 2025 final answer key)

Concept used: Least squares for a line through the origin: w∗=∑xiyi∑xi2w^* = \dfrac{\sum x_i y_i}{\sum x_i^2}.

First step: Minimise ∑(yi−wxi)2\sum (y_i - w x_i)^2 by setting its derivative to zero, giving w=∑xiyi/∑xi2w = \sum x_i y_i / \sum x_i^2. Compute ∑xiyi=−1−10+15\sum x_i y_i = -1 - 10 + 15.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2025 DA question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key