Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a noob statistics question.

Is there a function, such that given the residuals from the line of best fit, and a probability, A, it will return B such that there is an A probability of being within a radius B units from the line of best fit? Can standard deviation be used in this case?

For example: I have a set of data predicting how much a rubber band will stretch. I can very the length (independent variable) and measure how far it stretches (dependent variable). I have a linear regression using google spreadsheets functions (something like this). I want to be able to say that there is a 95% chance my rubber band will be within 5 centimeters from the predicted value.

I have done outside research, but it seems that more of statistics is concerned with proving two variables are related, instead of calculating the error given a tolerance probability.

share|cite|improve this question
One student at my highschool suggested I calculate the standard deviation, using the the predicted value as the mean (calculating the square-root of the sum of the squares of the residuals). – Sam Nov 23 '13 at 0:00

Your example is confusing, because the length=stretch, so IV=DV and there will be no error. You'd need something like force vs stretch.

Aside from that, it sounds like you'd like to know what bounds around your fitted line will capture a given proportion of future observations? If so, you want a tolerance interval simple linear regression. However, this is slightly different than what you want, because a tolerace interval has two probabilities associated with it, one for the proportion of future observations that will fall in that interval, and another for the level of confidence that such an interval actually does contain at least that proportion. Your function is more like a probability interval, which you can only get if you know the underlying distribution with certainty.

share|cite|improve this answer
What does IV = DV stand for? – Sam Nov 8 '13 at 20:56
In my example length * constant = stretch, but as my data isn't perfect, and only ideal springs (which don't actually exist) follow Hooke's Law there is at least some error. – Sam Nov 8 '13 at 21:05
If 1 unit of rubber band stretches 10 units of length, then 2 units of rubber band should stretch 20 units of length. Is this sufficient for "know[ing] the underlying distribution with certainty?" – Sam Nov 8 '13 at 21:05
Is confidence interval the same thing? – Sam Nov 8 '13 at 21:20
Sorry for random notation, IV=independent variable, DV=dependent variable. What I was saying is that if you have increased a rubber band's length by, say, 2 inches, then it has, by definition, stretched by 2 inches as well. There is not error. Hookes law relates Force to displacement, but you are relating displacement to displacement. – user76844 Nov 9 '13 at 0:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.