Compute Posterior of Uniform Distribution, Log-Normal Prior

bayesianlogarithmsnormal distributionprobabilitystatistics

Say we have $X_1, … X_n$ iid, all $Unif(0, \tau)$. In other words, $f(X \vert \tau) = \frac{1}{\tau^n}$. We also have that $\nu = log(\tau) \sim N(\mu, \sigma^2)$, ie. $\tau$ is log-normally distributed.

How can I compute the $posterior$ distribution of $\nu$, ie. $p(\nu \vert x)$?

I tried to write out the joint distribution (with the goal of marginalizing) of $\nu$ and $f(X \vert \nu)$, but I don't think what I'm doing is right. What I have so far for the joint is:
$$\frac{1}{\sqrt{2\pi\sigma^2}} \cdot exp(-(\nu-\mu)^2/2\sigma^2) \cdot \frac{1}{exp(n \cdot \nu)}$$

This also looks to be like some normal distribution form. I'm hoping to marginalize without actually having to compute an integral, but am stuck on the algebra in the exponent and am not sure if what I did is even right in the first place. Any suggestions would be very helpful.

Best Answer

Adding in indicators for the support of the uniform likelihoods, the joint distribution is $$\frac{1}{\sqrt{2 \pi \sigma^2}} \exp\left(-\frac{(\nu - \mu)^2}{2\sigma^2} - n \nu\right) \prod_{i=1}^n 1_{0 \le X_i \le e^\nu}.$$

Completing the square in the exponent yields $$-\frac{(\nu - \mu)^2}{2\sigma^2} - n \nu = - \frac{1}{2\sigma^2}(\nu^2 + 2(\sigma^2 n - \mu) \nu + \mu^2) = -\frac{(\nu - (\mu - \sigma^2 n))^2}{2\sigma^2} + c.$$

Ignoring constants that do not depend on $\nu$, the posterior is proportional to $$\propto \exp\left(-\frac{(\nu - (\mu - \sigma^2 n))^2}{2\sigma^2}\right) \mathbf{1}_{\nu \ge \max_i \log X_i}.$$