If we have $$ X\sim Poisson(\lambda), Y|X = x\sim Binomial(x+1,p) $$ What is the correlation coefficient of X and Y?
So I used $$\rho=\frac{Cov(X,Y)}{\sqrt{Var(x)Var(Y)}} = \frac{E[X[E[Y|X]]-E[X]E[E[Y|X]]}{\sqrt{E[X](E[E[Y|X]^2] -E[E[Y|X]]^2)}}$$ Is this right? Because I got a wacky answer, and is there an easier way?
That is the correct approach, but use the following. $$\begin{align} \mathsf E(X)&=\lambda \\[1ex] \mathsf{Var}(X)&=\lambda&&=\mathsf E(X^2)-\mathsf E(X)^2 \\[1ex] \mathsf E(Y\mid X)&=(X+1)\,p \\[1ex] \mathsf {Var}(Y\mid X)&=(X+1)\,p\,(1-p) \\[2ex] \mathsf{Cov}(X,Y)&=\mathsf E(XY)-\mathsf E(X)\,\mathsf E(Y) \\[1ex] &=\mathsf E(X\,\mathsf E(Y\mid X))-\mathsf E(X)\,\mathsf E(\mathsf E(Y\mid X)) \\[2ex] \mathsf {Var}(Y) &=\mathsf E(\mathsf {Var}(Y\mid X))+\mathsf{Var}(\mathsf E(Y\mid X))&&\star \end{align}$$