0
$\begingroup$

Consider a linear regression model like this:

enter image description here

I want to draw two margins, say upper- and lower-bounds, which contains 95% of the data.

Formally, given a regression model ($\hat{y} = Ax+B$), I want to find the margin with $\epsilon$ length from each side of the regression line such that the absolute error of the model is less than a certain amount for 95% of the training data. In other words:

$| Ax_i+B - yi| < \epsilon$ for 95% of the $x_i$ values.

What is the proper term for this? How can I estimate it?

PS. The literature I found so far is mostly about the confidence intervals of the oracle values for slope and the base ("A" and "B"), but that's not what I am looking for.

PS. I am using Bayesian linear regression, but I guess the answer is oblivious to whether one uses Bayesian or ordinary linear regression.

$\endgroup$
3
  • 1
    $\begingroup$ It's unclear what you might be looking for. If you want the bands to include 95% of the data, that's a simple algorithm. But if you want them to include 95% of the underlying distribution, that's a statistical question answered by some form of a tolerance interval. $\endgroup$ – whuber Jan 6 at 18:10
  • $\begingroup$ @whuber Perfecto. tolerance interval is what I was looking for. Perhaps we can say that the k% tolerance interval is an estimation of the k% margin for future / test data, right? $\endgroup$ – Ali Jan 6 at 18:19
  • $\begingroup$ That would be a prediction interval. It tends to be comparable in size to a tolerance interval, but the concept differs because future data are random and you have to account for that. $\endgroup$ – whuber Jan 6 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.