When performing a linear regression we first get a slope and intercept that is the best fit.
How do we compute the confidence interval for predicted values?
Here's an example:
y = 2x + 3
So for x equal to 2 we have y equal to 7. If we also want to be able to say that we are 90% certain that the predicted value of 7 lies within the interval [X, Z], how do we calculate
Some of the comments asked for the use case. I'd like to show what the confidence interval for a predicted value in an application. I'm using Apache Commons Math and I don't see a method that computes this in the Javadoc, so I'm guessing I'll have to code it myself.