Use the following steps to find the equation of line of best fit for a set of ordered pairs (x1,y1),(x2,y2),... (xn,yn) . Step 1: Calculate the mean of the x -values and the mean of the y -values. Step 4: Use the slope m and the y -intercept b to form the equation of the line.