# Calculate confidence interval over Relative Prediction Error

I am trying to understand the concept of the confidence interval, but I get confused with t-test, p-values, standard deviation, and quantiles. My problem is the following:

I created a model in machine learning that predicts a dependent variable. For each prediction, I calculate the Relative Prediction Error (prediction - true Value / true value).

1. I want to calculate the confidence interval so that I could say, for example, between the interval [-1, 1] (let's assume that the errors are normally distributed around the 0) is where 95% of the relative errors are. How can I do this?

2. Is it possible to have the distribution of the Relative Prediction Errors with positive or negative skewness? If so, will the intervals, where 95% of the relative errors are, be symmetrical or asymmetrical? (e.g., [-2, 1] or [-1, 2])?

• There seems to be a misunderstanding about the meaning of a confidence interval. Are you more interested in a prediction interval (on relative scale)? – Michael M Aug 1 at 20:53

To provide an interval that captures $$P$$% of your relative prediction errors, you could simply use the ($$\frac{100 - P}{2}$$)th and ($$100 - \frac{100 - P}{2}$$)th sample percentiles of your relative prediction errors as estimates of the lower and upper boundary of the interval. For example, if you wanted to capture 90% of the errors, you would use the 5th and 95th percentiles.