in the following screenshotwe can see that visually it looks better (even though few outliers may be having disproportionate impact on the result)ideallythoughwe would like to measure how good of fit this is quantitatively in order to do sowe can ask how close our prediction is for thiswe now look at one of those other returned values from the np linalg lstsq functionthe second element(slope,bias),total_error, , np linalg lstsq( ,yrmse np sqrt(total_error[ ]/len( )the np linalg lstsq function returns the total squared error for each elementit checks the error (the difference between the line and the true value)squares itand returns the sum of all these it is more understandable to measure the average errorso we divide by the number of elements finallywe take the square root and print out the root mean squared error (rmsefor the first unbiased regressionwe get an error of while adding the bias improves it to this means that we can expect the price to be different from the real price by at the most thousand dollars