# Compute the mean of a random variable

Imagine I have for a single individual some variable $X$ with mean $\lambda$ (for example the number of cars he has). Now I take a whole population of individuals. The parameter $\lambda$ for each of them is indeed different. Assume $\lambda \sim exp (\alpha)$. Let now $X$ be the variable $Y$ for a random selected individual in such population (i.e. $X$ is the number of cars for a randomly selected individual). What is $E X$ in this case?

Thanks a lot for your help!

Note that $E[X\mid\Lambda]=\Lambda$ hence $E[X]=E[E[X\mid\Lambda]]=E[\Lambda]$. If $\alpha$ denotes the mean of the exponential distribution, then $E[\Lambda]=\alpha$ hence $E[X]=\alpha$. If $\alpha$ denotes the rate of the exponential distribution, then $E[\Lambda]=1/\alpha$ hence $E[X]=1/\alpha$.