The data analyzed here is a sample of individuals collected on a monthly basis. What would be the best way to compute "confidence"prediction intervals" for the monthly sample means, in order to indicate the natural variability that can be expected from this value month after month?
Here is an example:
- All individuals are sampled with replacement from the same population whose mean is expected be the same across all months;
- $y_i$ for individual $i$ is the variable of interest, with $ y_i \sim N(y,\sigma)$, both $y$ and $\sigma$ are unknown;
- $N_m$ is the sample size for month $m$;
- $\bar y_m$ is the sample mean for month $m$.
What would be the best way to compute a 95% confidenceprediction interval for $\bar y_m$?
I thought of doing the following:
- $\bar y $ is the sample mean across the whole sample;
- $\bar \sigma $ is the standard deviation across the whole sample;
- For each month $j$, I compute the interval as $[ \bar y - 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ; \bar y + 1.96 \frac{\bar \sigma}{ \sqrt{N_m}} ]$.
I'm afraid this is not statistically correct. Simulations I've been doing show that this interval contains the monthly value more than 95 times out of 100. I assume this is caused by the fact that I do not consider the uncertainty in the estimation of $\bar y$.
What would be the correct way to proceed?
Thanks.