# Formula for closest distance to regression line

i need to calculate the closest distance of the point that lies closest to the regression
line for my programing but i am not sure what is the formula. maybe someone can help me out here?

What are you given..? A set of points and you want to fit them to a straight line?

Without further information I would suggest computing the distance to the line for every point and then taking the minimum.

arildno
Homework Helper
Gold Member
Dearly Missed
I agree with pere Callahan.

But I really don't see what possible interest such a calculation could have.

After all, you could have points lying ON the line of regression, and still have a very bad approximation.

i am trying to find the nearest point to regression line
Having found the regression line, i will need to figure out the point that lies closest to the regression line.

arildno
Homework Helper
Gold Member
Dearly Missed
i am trying to find the nearest point to regression line
Having found the regression line, i will need to figure out the point that lies closest to the regression line.