# Should I use confidence or prediction interval to calculate cost uncertainty (Simple Linear Regression)? [duplicate]

(I'm going to give an analogy, since I can't use the real example as it's work related!)

I need to estimate how much it may cost to purchase a 200kg refrigerator, based on previous experience.

I have a linear graph (R^2 > 0.9) detailing over 100 purchases of refrigerators, detailing its weight (x-axis) and cost (y-axis). Let's say the refrigerators in the dataset vary from 10kg to 1000kg (i.e. no extrapolation required).

Assuming I wanted to know the y-value (cost) at X = 200 (weight), how could I calculate the uncertainty? Would this be the smaller confidence interval, or the larger prediction interval?

I've always struggled with this question and would greatly appreciate a distinction of when to use one rather than the other.

Thank you

• Kind of, but I'm still not sure why you wouldn't want the average cost of 200kg refrigerators (confidence interval) rather than the prediction interval? – Bob Greggary Jul 8 '20 at 17:55

## 1 Answer

I believe you should use the prediction interval. You wrote that you care "about the cost to purchase a 200kg refrigerator" so you care about the distribution of Y for X=200, not the distribution of the mean/average Y for X=200. To know that you are getting a good deal, you need to know the distribution of costs.

If your KPI was the average cost per 200 kg refrigerator (say you were in charge of a big purchase of K refrigerators for a client and you were trying to write a bid for that project), the CI is arguably what you would care about in doing your profit scenarios.

The confidence interval is for the average cost of 200 kg refrigerators (your estimate of the conditional expectation in the population of 200 kg refrigerators).

The prediction interval gives you the interval for the costs of 200 kg refrigerators, which will be more variable than their mean.

We can make this problem even simpler by making it univariate. Let's imagine you sell ties, and you need longer ties for people with big necks so the ties can still reach the top of their belt buckles. You have some idea of the average neck size from previous customers, and you have some idea of how average neck size is distributed. The more data you have, the tighter that distribution. But average necks don't walk into your haberdashery; necks do. You care what is the likely range of neck sizes, you need to look at the distribution of Y, not mean Y. This means the PI is the relevant statistic. As you get more data, the uncertainty from estimating the mean shrinks to zero, but the uncertainty from the variation in Y remains.