I'm having trouble finding a good resource on this.
I'm plotting some timeseries data over the last 200 years that has a clear trend, although there is also a lot of noise. I have smoothed the data using a simple centered moving average of all observations with +/- 2 years of each year (some years have many observations, some none).
I wanted to also plot a confidence interval of the moving average. Naively, I thought I could just find the standard error of the observations included in the window for each year. For example, my data might look like:
year | value |
---|---|
4 | 1 |
4 | 2 |
5 | 2 |
7 | 5 |
7 | 4 |
8 | 7 |
9 | 5 |
10 | 9 |
10 | 8 |
For year 5, the observations in the window are 1,2,2,5,4. The moving average is 2.8. The standard deviation of these observations is 1.47, and the standard error is that divided by $\sqrt{5}$, which is 0.66. Assuming normal noise, this would give a 95% CI of +/- 1.96*0.66 = 1.29. That seems right to me but I cannot find a resource to confirm that.
Is that a reasonable thing to do? And could anyone point me to a resource that tells why that is/isn't ok