Formula for closest distance to regression line

Click For Summary

Discussion Overview

The discussion revolves around calculating the closest distance from a set of points to a regression line. Participants explore the methods for determining this distance and the relevance of such calculations in programming contexts.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested, Homework-related

Main Points Raised

  • One participant seeks a formula for calculating the closest distance from a point to a regression line.
  • Another participant suggests computing the distance from each point to the regression line and selecting the minimum distance.
  • A third participant expresses skepticism about the usefulness of this calculation, noting that points can lie on the regression line yet still represent a poor approximation.
  • Several participants reiterate the need to find the nearest point to the regression line after determining the line itself.
  • There is a query about the general method for calculating the distance between a point and a line, with a suggestion to create an algorithm for this purpose.

Areas of Agreement / Disagreement

Participants express varying levels of interest in the calculation's relevance, with some agreeing on the method to find the closest point while others question its significance. No consensus is reached regarding the importance of the calculation.

Contextual Notes

The discussion lacks specific details about the dataset or the regression line's characteristics, which may affect the proposed methods and their applicability.

tnecniv
Messages
15
Reaction score
0
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?

thanks in advance
 
Physics news on Phys.org
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.
 
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.

Thanks in advance
 
tnecniv said:
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.

Thanks in advance

Do you know how, in general, to find the distance between a point and a line?

If you do, just make an algorithm to calculate those distances, and pick out that point whose distance is the least.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
3
Views
3K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 23 ·
Replies
23
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K