# 95% prediction interval for price change

I have dataset with product prices observed during period of time. E.g.

day_number | price
1 | 10
3 | 11
6 | 8
12 | 9
15 | 12
20 | ??

Price is recorded in data only on some days - it's missing for most of the days. If we assume that daily price changes are normally distributed with mean of zero and some standard deviation $X\sim N(0,\sigma_1^2)$, how can we calculate (based on data) 95% prediction interval for price on day 20?
I guess I need to first find most likely parameters for $X$ and then use formula for distribution of sum of random variables and get the prediction interval from there?

• +1 Interesting question--and your proposed approach is good (although sensitive to the assumed normality of price changes, which will break down at low prices:you will need to check that assumption after estimating $\sigma_1$). Please note that your question asks for a prediction interval, not a confidence interval. But why did you apply the bayesian tag? And the sampling tag? If anything, time-series would be more appropriate, as well as missing-data.
– whuber
Commented Aug 15, 2016 at 17:27
• Thanks, I have edited the post according to your advice. I have initially set those tags based on my intuition about the problem, but I lack formal statistical knowledge so I guess those make no sense. Commented Aug 15, 2016 at 18:50

First, scale all the differences to obtain iid observations to estimate $\sigma_1^2$. For instance,

$Price(6) - Price(3) \sim N(0,3\sigma_1^2) => (Price(6) - Price(3)) / \sqrt{3} \sim N(0,\sigma_1^2)$

If we denote scaled observations as $y_i$, the estimate of $\sigma_1^2$ is:

$\sigma_1^2 = \frac{1}{N}\sum\limits_{i=1}^N y_i^2$

Then you can get a CI using that

$Price(20) \sim N(12,(20-15) * \sigma_1^2)$

This approach ignores the uncertainty in $\sigma_1^2$ estimation. If you want to take that into account as well, you'll have to use simulation.

• It's a good approach, but falls short at the end. It will be important to account for the uncertainty in the estimate of $\sigma_1^2$ because it's going to be large in examples like this. I believe there may be closed-form formulas for prediction limits.
– whuber
Commented Aug 15, 2016 at 19:49