1 1 vote Three points in the $x-y$ plane are $(-1,0.8),(0,2.2)$ and $(1,2.8).$ The value of the slope of the best fit straight line in the least square sense is___________(Round off to $2$ decimal places) Quantitative Aptitude gate2023-ee numerical-answers analytical-aptitude + – admin 811 views answer comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Ans :- 1.00For NNN points (xi,yi)(x_i,y_i)(xi,yi), the least-squares slope mmm ism=N∑xiyi−(∑xi)(∑yi)/ N∑xi^2−(∑xi)^2. legend_of_cse answered Aug 23, 2025 legend_of_cse comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Formula for slope of the best-fit line (least squares) for the points: Answer is 1 kp6602 answered Feb 22 kp6602 comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes By matrix method optimal vector $\text{w}^* = (XX^\top)^{-1}XY$ where $X$ and $Y$ are vectors containing values values of x and y respectively. $$X=\begin{bmatrix} 1& 1 & 1 \\ -1 & 0 & 1 \\ \end{bmatrix}, \quad Y= \begin{bmatrix} 0.8\\ 2.2\\ 2.8\\ \end{bmatrix}$$ Note first row of $X$ is for the intercept term of the line. $$(XX^\top)^{-1} = \frac{1}{6}\begin{bmatrix} 2 & 0\\ 0 & 3 \\ \end{bmatrix} \quad XY=\begin{bmatrix} 5.8 \\ 2 \\ \end{bmatrix}$$ $$\boxed{\text{w}^* =(XX^\top)^{-1}XY =\begin{bmatrix} \frac{11.6}{6} \\ 1 \\ \end{bmatrix}} $$ so best fit line : $y=\vec{x} \cdot \text{w}^*$ or $y=\text{w}_0 +x_1\text{w}_1$ We have slope = $\boxed{\text{w}_1 = 1}$ gbhavanag0 answered Feb 28 gbhavanag0 comment Share Follow 0 reply Please log in or register to add a comment.