I know that (U stands for uniform distribution)$$ t|x \sim U(0,\frac{1}{x})$$ while x is a random variable itself, distributed exponentially: $$x\sim exp(\lambda)$$
now i thought using the law of total expectation in order to find the variance of t:
$$E[t] = E[E[t|x]] = E[\frac{1}{2x}]$$
and $$ E[t^2]=E[E[t^2|x]] = E[\frac{1}{12x^2} + \frac{1}{(2x)^2}] = E[\frac{1}{3x^2}] $$
and then calculating $$ V[t]=E[t^2]-(E[t])^2=E[\frac{1}{3x^2}]-E[\frac{1}{2x}]$$
but knowing $$ x \sim exp(\lambda)$$
each of these terms diverges..
am I wrong? is there any other way doing this?
The mean and variance of an exponential distribution do converge. Because $X\sim\mathcal{Exp}(\lambda)$, therefore:$$\begin{split}\mathsf E(X)&= \lambda^{-1}\\\mathsf E(X^2)-\mathsf E(X)^2&=\lambda^{-2}\end{split}$$
Also since $T\mid X\sim\mathcal U(1,\tfrac 1X)$ therefore: $\mathsf E(T\mid X)=\dfrac X2$ and $\mathsf E(T^2\mid X)=\dfrac{X^2}{3}$