Probability: Finding the Expected Value of a Random Variable Derived From a Definition. I recently posted this example, and there's another question  about it I don't really understand.
It says: 

Assume that $Y$ denotes the number of bacteria per cubic
  centimeter in a particular liquid and that $Y$ has a Poisson
  distribution with parameter $x$. Further assume that $x$ varies from
  location to location and has an exponential distribution with
  parameter $β = 1$. 
   -Find $E(Y)$

It is known that the PDF for this distribution is: 
$$f(y,x) = e^{-2x}\frac{x^y}{y!}$$ 
In the lecture slides, it says that $E(Y) = E(E(Y\mid X)) = E(X) = 1$ 
However, I'm not clear how this is used. I think that we can set up some kind of integral, but I think there could be a faster method than that. 

When you are facing well-known distributions like the Poisson, usually you don't have to derive its mean, you just have to use what is known about it, unless you are required to do so, but I think that is not the case here.
Hint #1: $f_{Y \mid X}(y \mid x)$ is a Poisson distribution with parameter $x$. So, $E[Y \mid X=x]$ is just the mean of a Poisson random variable with parameter $x$.
"Hint" #2: After Hint #1 you should find that $E[Y \mid X=x]=x$. Note that this expected value (a number!) has the same form for any value of $x$, therefore we can write $E[Y \mid X] = X$. Since $X$ is a random variable, $E[Y \mid X]$ is also a random variable that happens to be equal to $X$, and therefore $E[E[Y \mid X]] = E[X]$. Be aware that $E[Y \mid X]$ is a function of $X$, not $Y$, and in that way the outer expected value operator is taken respect to $X$.
Hint #3: Take at look at here to find out what else $E[E[Y \mid X]]$ is according to the iterated expectations law.
