People arrive at rate 20 per unit time. The bus comes uniformly on $[1/2,3/2]$. Let $X$ all people who take the bus (all of them do).
Find $Var(X)$ and $E(X)$
For expectation: $E(X)=\int_{1/2}^{3/2} E(X|Y=y)f_y dy=\int_{1/2}^{3/2} E(X|Y=y) dy= \int_{1/2}^{3/2} 20y =20$
For Variance: $$Var(X)=E(Var(X|Y)) + Var(E(X|Y))$$ where $$E(Var(X|Y=y)=E(X^2|Y=y)-E(X|Y=y)^2$$
However, I can't figure it out.
Let $T \sim [1/2, 3/2]$, so $f_T(t) = 1$, $1/2 \le t \le 3/2$ and $0$ otherwise. Let $X(t)_{|T=t} \sim Poiss(20t)$. So, we deduce using the properties of Poisson distribution that $E(X(t)|T=t)=Var(X(t)|T=t)=20t$, hence the calculation follows
$$E(X(t))= E(E(X(t)|T=t)) = E(20T) = 20E(T) = 20.$$ The last equality stems from the symmetry of the uniform distribution, i.e., $E(T)=1$.
And the variance, \begin{align} Var(X(t)) &= E(Var(X(t)|T=t))+ Var(E(X(t)|T=t))\\ &= E(20T)+Var(20T)\\ &= 20+\frac{20^2}{12} = 20(1+20/12) , \end{align} the last row is a result of the fact that $Var(T)=\frac{1}{12}$.