By Cochran's theorem, if $y_1,....,y_n\sim\mathcal{N}\left(0,\sigma^2\right)$ independently with a known variance $\sigma^2\in\mathbb{R}_{>0}$, then \begin{equation} (n-1)\frac{S^2}{\sigma^2}\sim\chi^2_{n-1}, \end{equation} where \begin{equation} S^2=\frac{1}{n-1}\sum_{i=1}^{n}(y_i-\bar{y})^2\sim\frac{1}{n-1}\sum_{i=1}^{n}y_i^2, \end{equation} is the sample variance. However, when the variance $\sigma^2$ is unknown, what is the distribution of $S^2$? Would this require applying Bayes' theorem such that \begin{equation} p\left(S^2\right)=\int_0^{\infty} p\left(S^2\mid \sigma^2\right)p\left(\sigma^2\right)\mathop{d\sigma^2}, \end{equation} and, if so, what would be an appropriate (probably uninformative) prior pdf for $\sigma^2$? One option is using Jeffrey's prior, where we have $p(\sigma^2)\propto\sigma^{-2}$ and so $\sigma^2\sim\text{Scale-inv-}\chi^2(\nu,S^2)$ with $\nu=n-1$, since the data is normal. The distribution for $S^2\mid\sigma^2$ would be scaled chi-squared which is given as \begin{equation} p(S^2\mid\sigma^2)=\frac{2^{-\nu/2}}{S^2\Gamma(\nu/2)}\left(\frac{\nu S^2}{\sigma^2}\right)^{\nu/2}\exp\left(-\frac{\nu S^2}{2\sigma^2}\right), \end{equation} if I haven't made an error with the CDF method. Any help would be much appreciated.
-
2$\begingroup$ Whether you know $\sigma^2$ or not, the distribution remains the same: nature doesn't care about your state of mind. $\endgroup$– whuber ♦Nov 21, 2022 at 13:44
-
$\begingroup$ $$p\left(S^2\right)=\int_0^{\infty} p\left(S^2\mid \sigma^2\right)c\sigma^{-2}\mathop{d\sigma^2} = cS^{-2}$$ With an improper distribution for $\sigma$ you will get that the marginal distribution of $S^2$ will be improper as well. It is the posterior distribution, which is a ratio of two improper distributions, where the constant $c$ disappears. $\endgroup$– Sextus EmpiricusNov 21, 2022 at 14:01
-
$\begingroup$ @SextusEmpiricus Thank you for that derivation (I would upvote if I could). $\endgroup$– UNOwenNov 22, 2022 at 10:35
1 Answer
One option is using Jeffrey's prior, where we have $p(\sigma^2)\propto\sigma^{-2}$
This won't work. With an improper distribution for $\sigma$ you will get that the marginal distribution of $S^2$ will be improper as well.
More precisely you will get
$$p\left(S^2\right)=\int_0^{\infty} p\left(S^2\mid \sigma^2\right)c\sigma^{-2}\mathop{d\sigma^2} = cS^{-2}$$
It is the posterior distribution, which includes a ratio of two improper distributions $p(\sigma^2)$ and $p(S^2)$, where the constant $c$ disappears.
I derived the above indirectly by using Bayes' formula and the expression for the inverse Gamma distribution.
$$p(\sigma^2|S^2) = \frac{p(\sigma^2) p(S^2|\sigma^2)}{p(S^2)}$$
with $p(\sigma^2)$ and $p(S^2|\sigma^2)$ known, you can argue that $p(\sigma^2|S^2) \propto {p(\sigma^2) p(S^2|\sigma^2)}$ must be an inverse Gamma distribution. Then you use the expression for the inverse gamma distribution to figure out the normalization constant and derive $p(S^2)$.