Suppose that $W$ has an exponential distribution with mean $1$, and suppose that $X|W ∼N(0,W^{-1})$.
Write down the probability density of $W$ conditional on $X$.
My workings so far: $$f_W(w)=e^{-w}, \ w\geq 0$$ $$f_{X\mid W=w}(x,w)=\frac{\sqrt{w}}{\sqrt{2\pi}}e^{-\frac{wx^2}2}$$ $$f_{X,W}(w,x)=\frac{\sqrt{w}}{\sqrt{2\pi}}e^{-w-\frac{wx^2}2}$$
Now in order to get $f_{W\mid X=x}(w,x)$ I need to divide $f_{X,W}(w,x)$ by $f_X(x)$. To get $f_X(x)$ I took the limit of $f_{X,W}(w,x)$ as $w$ tends to $\infty$, which gives me $0$, so I'm dividing by $0$. Can somebody show me where I've made my mistake.