# Deriving posterior distribution for variance of normal distribution

I have a task to derive posterior distribution for parameter $$\sigma^2$$, given that the data vector $$y^t = (y_1,...,y_t)$$ is from $$N(0,\sigma^2)$$. The uninformative prior for $$\sigma^2$$ is $$h(\sigma^2)\propto \frac{1}{\sigma^2}$$. The posterior should be inverse gamma. So far I have: $$h(\sigma^2|y^t) = \frac{\left(2 \pi \sigma^2 \right)^{-t/2}\exp\left[-\frac{1}{2\sigma^2}\sum^t_{i=1}y_i^2\right]\cdot\frac{1}{\sigma^2}}{\int_{-\infty}^{\infty}\left(2 \pi \sigma^2 \right)^{-t/2}\exp\left[-\frac{1}{2\sigma^2}\sum^t_{i=1}y_i^2\right]\cdot\frac{1}{\sigma^2} d\sigma^2} = \frac{\left(\sigma^2 \right)^{-t/2-1}\exp\left[-\frac{1}{2\sigma^2}\sum^t_{i=1}y_i^2\right]}{\int_{0}^{\infty}\left(\sigma^2 \right)^{-t/2-1}\exp\left[-\frac{1}{2\sigma^2}\sum^t_{i=1}y_i^2\right] d\sigma^2}$$

Unfortunately, I've become stuck here, as I know I should somehow get Gamma function in the denominator, but I don't know how. Any help would be appreciated!

The easiest way would be to recognize that your posterior has the form of an inverse Gamma distribution as $$h(\sigma^2|y^t) \propto (\sigma^2)^{-t/2-1}\exp\left[-\frac{1}{2\sigma^2}\sum_{i=1}^t y_i^2\right] = \left(\frac{1}{\sigma^2}\right)^{t/2+1}\exp\left[ - \frac{\frac{1}{2}\sum_{i=1}^t y_i^2}{\sigma^2}\right] \propto InvGamma(t/2, \frac{1}{2}\sum_{i=1}^t y_i^2)$$ The normalization constant, thus the solution to the integral is known for the inverse gamma distribution and is given by $$\frac{(\frac{1}{2}\sum_{i=1}^t y_i^2)^{t/2}}{\Gamma(t/2)}$$.