# Excel r value to percentage

1. Sep 13, 2015

### 24forChromium

I just need a quick answer, say I have a bunch of data points on a graph, I made a trendline with a function of
y = 5x + 6, and a r value of R^2 = 3, is there a way of converting the r value into a percent uncertainty in the prediction of the functions? Say I used the function to predict when x = 4, the result would be 26 when the function is infinitely accurate, but since it's not, how can I add an uncertainty value to the 26?

2. Sep 13, 2015

### andrewkirk

If you want to express confidence intervals for your predictions, I think the 'standard error of residuals' is the number needed.

The assumption underlying ordinary least squares linear regression is that the dependent variable is equal to the predicted linear sum (which is deterministic) plus a a random error term ('residual') that is normally distributed.

If you want a two-sided x% confidence interval for your estimate then the error bounds are estimate plus/minus

stderror times $\Phi^{-1}(\frac{1}{2}(x+1))$ where $\Phi^{-1}$ is the inverse of the Standard Normal cumulative dist function. I think the Excel name for it is something like NORMSINV.