Product of Dependent Discrete RVs

28 Views Asked by At

$X$ is chosen uniformly from $\lbrace 1,2,\ldots, n\rbrace$ and then $Y$ is chosen uniformly from $\lbrace 1,2,\ldots, X \rbrace$. I want to compute $P(Y=j)$ and $E(XY).$

These variables aren't independent. So if I take $W=XY,$ then $1\le W\le n^2$ I have $E(W)=\sum_{i=1}^{n^2}iP(W=i)$. I'm not sure how to compute $P(W=i).$ I can figure out this value for some $i$'s, but if $i=n+1$, what is $P(W=i)$?

2

There are 2 best solutions below

2
On BEST ANSWER

$E(XY)=E(E(XY\mid X))=E(XE(Y\mid X))$

$E(Y\mid X=N)=\sum_{y=1}^{N}\frac{y}{N}=\frac{N+1}{2}$

Then $$E(XE(Y\mid X))=E(X\cdot \frac{X+1}{2})=\frac{1}{2}[E(X^2)+E(X)]\\=\frac{1}{2}\cdot \Big[\frac{(n+1)(2n+1)}{6}+ \frac{n+1}{2}\Big]\\=\frac{(n+1)(n+2)}{6}$$

(Check if my calculation is ok or not!)

0
On

Law of Total Expectation: $$\mathbb E[XY] = \mathbb E[\mathbb E[XY|X]] = \mathbb E[X \mathbb E[Y|X]]$$