I spent over an hour of my exam's given time to calculate the variances and expected values as given here: Let $p,q\in (0,1)$. The number of costumers entering a supermarket is a r.v. $X$ with geometric distribution with parameter $q$. Every costumer buys a product with probability $p$ or buys nothing, with $1-p$. Let $Y$ be the number of products purchased (or bought? Is there a difference?). What is $E[Y]$? $V[Y]$?
The problematic part is that after a long computation, I arrived at $p\over q$. The formal answers simply argued: $E(Y)=E(Y|X)=\color{green}{E(pX)}=pE(X)={p\over q}$, where the green part is an argument never have I ever encountered. I couldn't compute the second one for it became too intricate(That is a really long multiple choice test.), but the formal answers used that again: $V(Y)=E(V(Y|X))+V(E(Y|X))=\color{green}{E(p(1-p)X)+V(pX)}$, and I wonder, why is $E(X|Y)=E(E(X)Y)$? I would appreciate your help.
Okay I am under the impression that suggesting free points is unorthodox or illegitimate here. I will wait as long as it enables me, for an answer to be given, and share my points with the answer I happen to see as best in my view.