227,501 views
11 votes
11 votes
Use linear regression to find afunction that fits the followingpoints.(-5,14), (1,-16)

User Pyjong
by
3.0k points

1 Answer

18 votes
18 votes

Given:

(-5,14), (1,-16)

The linear regression formula is


y=mx+b

Substitute x=1 and y=-16 in the formula, we get


-16=m(1)+b


-16=m+b

Subtracting m from both sides of the equation, we get


-16-m=m+b-m


-16-m=b

We get


b=-16-m

Substitute x=-5 and y=14 in the formula, we get


14=m(-5)+b


14=-5m+b

Substitute b=-16-m in this equation to find the value of m.


14=-5m-16-m


14=-6m-16

Adding 16 to both sides of the equation, we get


14+16=-6m-16+16_{}


30=-6m

Dividing both sides by (-6), we get


(30)/(-6)=-(6m)/(-6)
m=-5

Substitue m=-5 in b=-16-m to find the value of b.


b=-16-(-5)


b=-16+5
b=-11

Substitute b= -11 and m= -5 in the line equation, we get


y=-5x-11

Hence linear regression is


y=-5x-11

User Sandrino Di Mattia
by
3.2k points