# Number of points crossed by their best fit line

My lab teacher asked this question in class, but i find no way to work it out.

If I have $n$ points with their uncertainties, I know that they follow a linear expression and I find the best-fit line of them, is there a way to predict how many points will be crossed by the line?

I thought that this number should be related to the $\chi^2$ of the points that should be $\sim n$. Someone can help me even if I probably didn't explain myself well? Thanks!

• Could you please describe what it means for a "point" to be "crossed by [a] line"?
– whuber
May 20, 2014 at 15:29
• I mean the line passing through the point and its errorbar… @whuber May 20, 2014 at 15:41
• OK, then in order to answer this question we would need your definition of "uncertainty" or "error bar": how are these calculated and what are they intended to represent? (Common choices include one standard deviation, one standard error, and two standard errors, but many others are possible.) Also, the answer depends on how the "best-fit" line is estimated: if it uses weighted least squares (as strongly suggested by the availability of uncertainty estimates) the answer could differ from an unweighted least squares solution.
– whuber
May 20, 2014 at 16:07

In which case, you could maybe look at the residuals from the linear model, which reflect how far each point is from where your linear model predicts it should be. Obviously, residuals of $0$ are right on the regression line, while a residual of $\pm1$ is one standard deviation from where the model predicts.