I am trying to obtain the correct **posterior** distribution for a Bayes model with a *uniform* distribution for the *likelihood*, and a *Pareto* distribution for the *prior* (the Pareto is the conjugate prior for the Uniform). So far I have the following:

$p(a)$ is the prior

$p(D|a)$ is the likelihood of the data set D

$D = \{x\_{1}, ... , x\_{n}\}$ where all data points $x\_1$ through $x\_n$ are real valued, and $n$ is the total number of points

$p(a|D)$ is the posterior distribution (what I am trying to derive)

Now, the Uniform Distribution is defined like so:

$Unif(a|c) = \dfrac{1}{2c} \times I(a \in [-c, c])$

where $I(true) = 1$ and $I(false) = 0$.

And the Pareto distribution is defined like so:

$Pareto(a|m,k) = k \times m^{k} \times a^{-(k+1)}$

The likelihood is a slight variation of the uniform distribution:

$p(D|a) = (\dfrac{1}{2a})^{n} \times I(a \ge max(\{|x\_{1}|, ... , |x\_{n}|\}))$

The prior distribution is derived from the Pareto distribution:

$p(a) = k \times m^{k} \times a^{-(k+1)} \times I(a \ge m)$

The **posterior distribution** is the likelihood times the prior, normalized:

$p(a|D) = \dfrac{p(a) \ p(D|a)}{\int\_{a' \in A} p(a') \ p(D|a') \ da'}$

**Plug in the distribution formulas**, and we get this:

$p(a|D) = \dfrac{k \ m^{k} \ a^{-(k+1)} \ (\dfrac{1}{2a})^{n} \times I(a \ge m) \times I(a \ge max(\{|x\_{1}|, ... , |x\_{n}|\}))}{\int\_{a' \in A} k \ m^{k} \ a^{-(k+1)} \ (\dfrac{1}{2a})^{n} \times I(a \ge m) \times I(a \ge max(\{|x\_{1}|, ... , |x\_{n}|\})) \ da'}$

which we can re-arrange like so:

$p(a|D) = \dfrac{k \ m^{k} \ (\dfrac{1}{2})^{n} \times a^{-(n+k+1)} \times I(a \ge m) \times I(a \ge max(\{|x\_{1}|, ... , |x\_{n}|\}))}{k \ m^{k} \ (\dfrac{1}{2})^{n} \times \int\_{a' \in A} \ a'^{-(n+k+1)} \times I(a' \ge m) \times I(a' \ge max(\{|x\_{1}|, ... , |x\_{n}|\})) \ da'}$

which we can simplify to:

$p(a|D) = \dfrac{a^{-(n+k+1)} \times I(a \ge m) \times I(a \ge max(\{|x\_{1}|, ... , |x\_{n}|\}))}{\int\_{a' \in A} \ a'^{-(n+k+1)} \times I(a' \ge m) \times I(a' \ge max(\{|x\_{1}|, ... , |x\_{n}|\})) \ da'}$

if we simply set $m = max(\{|x\_{1}, ... , |x\_{n}|\})$, we can simplify to:

$p(a|D) = \dfrac{a^{-(n+k+1)} \times I(a \ge m) \times I(a \ge max(\{|x\_{1}|, ... , |x\_{n}|\}))}{\int\_{a' = m}^{a' = +\infty} \ a'^{-(n+k+1)} \ da'}$

work out the integral on the bottom, we get **the final answer for our posterior distribution:**

$p(a|D) = \dfrac{a^{-(n+k+1)} \times I(a \ge m) \times I(a \ge max(\{|x\_{1}|, ... , |x\_{n}|\}))}{\dfrac{m^{-(n+k)}}{(n+k+1)}}$

where $n$ must be an *integer greater than zero*, and $k$ must be a *real value greater than zero*, and $m$ still satisfies this: $m = max(\{|x\_{1}|, ... , |x\_{n}|\})$

---

**My question is this:** our final answer for the posterior distribution (just like any other probability distribution) when integrated over its entire domain **must equal 1** ... regardless of the values we pick for the hyper parameters (m, k, n, etc). But my answer does not. In fact, as the hyperparameters change, the value of the distribution when integrated also changes. **Could someone please tell me where I went wrong? I've worked it out several times and keep arriving at the same answer.**

Thanks in advance