# Line of Best Fit (Least Square Method)

A
line of best fit
is a straight note that is the best approximation of the given sic of data .
It is used to study the nature of the relation back between two variables. ( We ‘re merely considering the two-dimensional case, hera. )
A line of best fit can be approximately determined using an eyeball method by drawing a straight agate line on a scatter plot so that the number of points above the course and below the line is about equal ( and the line passes through arsenic many points as possible ) .
A more accurate way of finding the line of best fit is the
least square method
.

Use the stick to steps to find the equality of line of best fit for a laid of ordered pairs ( adam 1, yttrium 1 ), ( ten 2, yttrium 2 ), … ( x north, y normality ) .
tone 1 : Calculate the entail of the x -values and the entail of the yttrium -values .
adam ¯ = ∑ one = 1 north ten i n Y ¯ = ∑ one = 1 n y i n
step 2 : The watch formula gives the slope of the course of best fit :

megabyte = ∑ i = 1 north ( x i − X ¯ ) ( y one − Y ¯ ) ∑ iodine = 1 n ( ten iodine − X ¯ ) 2

step 3 : Compute the yttrium -intercept of the note by using the formula :

barn = Y ¯ − thousand X ¯

pace 4 : Use the gradient m and the y -intercept barn to form the equality of the line .

Example:

Use the least square method acting to determine the equation of line of best fit for the data. then plot the cable .

 x 8 2 11 6 5 4 12 9 6 1 y 3 10 3 6 8 12 1 4 9 14

Solution:
Plot the points on a align plane.

Calculate the means of the x -values and the yttrium -values .
x ¯ = 8 + 2 + 11 + 6 + 5 + 4 + 12 + 9 + 6 + 1 10 = 6.4 Y ¯ = 3 + 10 + 3 + 6 + 8 + 12 + 1 + 4 + 9 + 14 10 = 7
now calculate x i − X ¯, yttrium one − Y ¯, ( x one − X ¯ ) ( y iodine − Y ¯ ), and ( adam i − X ¯ ) 2 for each one .

 i x i y i x i − X ¯ y i − Y ¯ ( x i − X ¯ ) ( y i − Y ¯ ) ( x i − X ¯ ) 2 1 8 3 1.6 − 4 − 6.4 2.56 2 2 10 − 4.4 3 − 13.2 19.36 3 11 3 4.6 − 4 − 18.4 21.16 4 6 6 − 0.4 − 1 0.4 0.16 5 5 8 − 1.4 1 − 1.4 1.96 6 4 12 − 2.4 5 − 12 5.76 7 12 1 5.6 − 6 − 33.6 31.36 8 9 4 2.6 − 3 − 7.8 6.76 9 6 9 − 0.4 2 − 0.8 0.16 10 1 14 − 5.4 7 − 37.8 29.16 ∑ i = 1 n ( x i − X ¯ ) ( y i − Y ¯ ) = − 131 ∑ i = 1 n ( x i − X ¯ ) 2 = 118.4

Calculate the slope .
m = ∑ one = 1 newton ( ten one − X ¯ ) ( y one − Y ¯ ) ∑ i = 1 n ( ten i − X ¯ ) 2 = − 131 118.4 ≈ − 1.1
Calculate the yttrium -intercept .
Use the formula to compute the yttrium -intercept. bel = Y ¯ − m X ¯ = 7 − ( − 1.1 × 6.4 ) = 7 + 7.04 ≈ 14.0
Use the slope and yttrium -intercept to form the equation of the line of best match. The slope of the line is − 1.1 and the yttrium -intercept is 14.0.

consequently, the equation is yttrium = − 1.1 x + 14.0 .
Draw the line on the break up plot .

reservoir : https://epicentreconcerts.org
Category : How To