Suppose that $X\sim \operatorname{Unif}(0,\theta)$ and assume a priori that $\Theta\sim Ga(2,1)$, that is $f_\Theta(\theta)\propto\theta e^{-\theta}\mathbb{1}_{[0,\infty)}(\theta)$.
Exercise: Derive the posterior density of $\Theta$.
What I've tried: I know that $$f_{\Theta\mid X}(\theta\mid x) = \dfrac{f_{X\mid\Theta}(x\mid\theta)\,f_\Theta(\theta)}{\displaystyle\int f_{X\mid\Theta}(x\mid\theta)\,f_\Theta(\theta)d\theta}\propto f_{X\mid\Theta}(x\mid\theta)\,f_\Theta(\theta)$$ What I'm unsure about is how to write $f_{\Theta\mid X}(\theta\mid x)\propto f_{X\mid\Theta}(x\mid\theta)\,f_\Theta(\theta)$, because this product of functions has two indicator functions in it, both with a different argument. We have (sort of?) $f_{\Theta\mid X}(\theta, x) \propto \dfrac{1}{\theta}\mathbb{1}_{(0,\theta)}(x)\,\theta e^{-\theta}\mathbb{1}_{[0,\infty)}(\theta)$ which makes me very uncomfortable. Furthermore when asked to give the posterior distribution, I'm not if I have to supply the entire fraction with the constant, or just the part to which it is proportional.
Question: How do I solve this exercise?
Thanks!
The prior is proportional as a function of $\theta$ to $\theta e^{-\theta} \, d\theta$ on the interval $\theta>0.$
The likelihood is $\dfrac 1 \theta$ on the interval $(X,\infty)$ (and there is no $d\theta$ is this).
Multiplying the two you get $e^{-\theta}\,d\theta$ on the interval $(X,\infty).$
Since $\displaystyle\int_X^\infty e^{-\theta} \, d\theta = e^{-X},$ the posterior distribution is $e^{X-\theta} \, d\theta$ on the interval $(X,\infty).$