# Explain why $E(X)=1.65$ and $Var(X)=1.64$

Let $U$ be uniformly distributed on the interval [$\frac{1}{3},1$]. Let $X$ be a random variable such that the conditional distribution of $X$ given $U=p$ is Geometric with parameter $p$.

(a) Find expressions for $E(X|U)$ and $Var(X|U)$

(b) Using your answer for (a) explain why $E(X)=1.65$ and $Var(X)=1.64$

I'm getting confused about the two different distributions in this problem. How do I approach this question?

a) It is given that $X_{|U=p} \sim Geo(p)$, so $E[X|U=p] = \frac{1}{p}$ and $Var[X|U=p] = \frac{1-p}{p^2}$.
$$E[X] = E[E[X|U]] = E\left[\frac{1}{u} \right] = \int_{1/3}^1\frac{1}{u}\frac{3}{2}du = \frac{3}{2}(0 + \ln(3)) \approx 1.65$$ For the variance of $X$ use the total variance formula, i.e., \begin{align} Var(X) &= E(Var(X|U)) + Var(E(X|U))\\ &= E\left[\frac{1-u}{u^2}\right] + Var\left[\frac{1}{u}\right]\\ & =\int_{1/3}^1\frac{1-u}{u^2}\frac{3}{2}du + \int_{1/3}^1\frac{1}{u^2}\frac{3}{2}du - 1.65^2 \end{align}
• Is $E_U$ the same as $E[U]$? – Lindsey G Feb 3 '16 at 17:52
• It was to emphasize that the Expectation or the Variance were taken w.r.t. the distribution of $U$. Anyway, I deleted this notation. It is not necessarily and clear from the context. – V. Vancak Feb 3 '16 at 18:10