987 views
0 votes
0 votes
Three values of x and y are to be fitted in a stright line in the form of y=a+bx by the method of least squares
Given
SIGMA x =6
SIGMA y=21
SIGMA x*x = 14
SIGMA xy = 46

Find the values of a and b

1 Answer

Best answer
3 votes
3 votes

$x_1+x_2+x_3 = 6$

$y_1+y_2+y_3 = 21$

$x_1^2+x_2^2+x_3^2 =14$

$x_1y_1+x_2y_2+x_3y_3 = 46$

--------------------------------------------------------------

we have equation of line ,$y=a+bx$, to which $(x_1,y_1),(x_2,y_2)\quad and \quad (x_3,y_3)$ satisfies

$y_1=a+bx_1$ , 

$y_2=a+bx_2$, and 

$y_3=a+bx_3$

--------------------------------------------------------------

from these equations we get ,

$y_1+y_2+y_3=3a+b(x_1+x_2+x_3)$

$21= 3a +6b$  ______$eq(1)$

--------------------------------------------------------------

$x_1y_1 = ax_1+bx_1^2$

$x_2y_2 = ax_2+bx_2^2$

$x_3y_3 = ax_3+bx_3^2$

--------------------------------------------------------------

from these equations we get 

$x_1y_1+x_2y_2+x_3y_3 = a(x_1+x_2+x_3)+b(x_1^2+x_2^2+x_3^2)$

$46 = 6a+14b$ ______$eq(2)$

--------------------------------------------------------------

so from equation $(1)$ and $(2)$

we get $a= 3$ and $b=2$

selected by

Related questions

0 votes
0 votes
1 answer
1
overflow1403 asked Dec 8, 2023
208 views
int func(int n){if(n <= 1)return n;elsereturn 3*func(n-3) - 3*func(n-2); }The running time of the above function is
1 votes
1 votes
0 answers
2
o asked Apr 29, 2022
427 views
In this won’t A and C both be correct answers as A can be obtained by considering only central part of C?Also, I tried this by brute force by putting some values; is th...
1 votes
1 votes
0 answers
3
Rishav Kumar Singh asked Jun 30, 2018
272 views
Given a deck of 10 cards numbered 1 to 10. Select 3 cards one by one. Find the probability that selected cards is in increasing order. Eg : {1, 5, 7} or {8, 9, 10} etc
2 votes
2 votes
1 answer
4
Hakuna Matata asked May 3, 2018
1,161 views
There are 12 pair of shoes, what is the probability that atleast one complete pair of shoes are present if 4 shoes are selected at random?