Suppose I draw $n$ samples $x_1...x_n$ of a random variable $x$, which is normally distributed with an unknown mean $\mu$ and variance $\sigma^2$. From those samples, I compute a sample mean $\bar x$ and a sample variance $s^2$. I wish to compute the distribution of $x_{n+1} \mid \bar x, s^2$, i.e. the distribution of one additional sample $x_{n+1}$, given my measured $\bar x$ and $s^2$.
How should I proceed? This is probably a bad way of proceeding with loads of issues, but here is my thought process so far:
- Start with the fact that $\frac{\bar{x} - \mu}{s/\sqrt{n}}$ is $t$-distributed, and then use that to find a likelihood of $\mu$ given $\bar x$.
- Use the fact that $\frac{x_{n+1} - \mu}{\sigma} \sim \mathcal N(0,1)$.
- Use the fact that $\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{n-1}$
- Combine these facts to get a distribution of $x_{n+1}$.
An alternative approach I thought of goes as follows:
- $x_{n+1}\sim N(\mu, \sigma^2)$
- $\bar x \sim N(\mu, \frac{\sigma^2}{n})$
- $(x_{n+1} - \bar x) \sim N(0, \sigma^2 + \frac{\sigma^2}{n})$
- Find the distribution of $\sigma^2 \mid s^2$ using the fact that $\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{n-1}$
- Integrate $N(0, \sigma^2 + \frac{\sigma^2}{n})$ over all possible $\sigma^2$ weighted by the distribution of $\sigma^2 \mid s^2$