Show that expression is Gamma distribution with given parameters

Solution 1:

We have

$$f(\lambda) = \frac{n^k}{p(y)}\lambda^ke^{-n\lambda}$$

is a density function where $\frac{n^k}{p(y)}$ is independent of $\lambda$.

Hence, by comparing with the pdf of gamma distribution, we conclude that it is a gamma distribution with the shape parameter being $k+1$ and the corresponding rate is $n$.

Note that the shape is equal to

$$k+1 = \sum_{i=1}^n y_i + 1 = n\bar{y} + 1.$$