I am going through a textbook example and am having trouble working it out myself and am unsure where I am going wrong. I understand the model is the likelihood function and that a Pareto can be transformed into exponential, but when I use the values I do not end up with the same answer.
Using the transformation $Y={\rm{ln}}\frac{X_i}{\theta}$, the Pareto becomes $\alpha e^{-y\alpha}$ and using the given values I end up with
$f_{{\bf{X}}|A}({\bf{x}}|α) = α^{10}e^{−1.650806α}$.
Let us suppose that annual claim amounts on a portfolio are modeled by a single-parameter Pareto distribution with parameter θ = 100 and α unknown. The prior information about α may be summarized by a gamma distribution Γ(α, θ) with α = 2 and θ = 1. Given the following claim amounts, determine all of the relevant Bayesian quantities.
$125\;132\;141\;107\;133\;319\;126\;104\;145\;223$
The prior has a gamma distribution with pdf
$\pi_A(α) = αe^{−α},\;α > 0,$
while the model is (evaluated at the data points)
$f_{{\bf{X}}|A}({\bf{x}}|α) = \frac{\alpha^{10}(100)^{10\alpha}}{\left( \prod_{i=1}^{10} x_{i}^{\alpha+1} \right)} = α^{10}e^{−3.801121α−49.852823}.$
The joint pdf of ${\bf{x}}$ and $A$ is (again evaluated at the data points)
$f_{{\bf{X}},A}({\bf{x}},\alpha) = \alpha^{11}e^{-4.801121\alpha - 49.852823}$.
Write out the hierarchical model. Let $X$ be the claim amount random variable.
$$X \mid A \sim \operatorname{Pareto}(\theta = 100, A), \\ A \sim \operatorname{Gamma}(2,1).$$ Then the posterior of $A$ given data $\boldsymbol x = (x_1, \ldots, x_n)$ is proportional to $$f_A(\alpha \mid \boldsymbol x) \propto f_{\boldsymbol X}(\boldsymbol x \mid \alpha)f_A (\alpha) = \left(\prod_{i=1}^n \frac{\alpha \theta^\alpha}{x_i^{\alpha+1}}\right) \alpha e^{-\alpha} = \frac{1}{\xi} \alpha^{n+1} \left(\frac{e \xi}{100^n}\right)^{-\alpha} \propto \alpha^{n+1} e^{-\alpha \log (e\xi/100^n)}$$ where $\xi = \prod_{i=1}^n x_i$. Therefore, the posterior is also gamma with shape $n + 1$ and rate $$\log \frac{e\xi}{100^n} = \log e + \log \xi - n \log 100 = 1 - n \log 100 + \sum_{i=1}^n \log x_i = 1 + n (\overline {\log x} - \log 100).$$
For the given data, it follows that the posterior hyperparameters for shape is $11$ and the rate is $4.80112$.