For the joint distribution $p(x_1,x_2)$ with $X_1\sim Bern(0.5)$, $(X_2|X_1=0)\sim Bern(0.1)$ and $(X_2|X_1=1)\sim Bern(0.8)$, compute the average $E(X1,X2)\sim p(x_1,x_2)[X_1X_2]$ by both using and not using the law of iterated expectations.
a) For not using the law of iterated expectations, I know that we need to multiply the variables by the function.
My understanding is that, $P(X_1=1)=0.5, P(X_1=0)=0.5$ and the function is $X_1X_2$. But I don't know $P(X_2)$ at all.
b) For using the law of iterated expectations, I know that we need to fix one of the variables, and divide by the marginal of that variable but I'm not sure how to start from that point.
My approach was making $X_1=0$ and work the probability and $X_1=1$ and work out another probability and adding them up.
I'd really really appreciate if you'd help me how to solve this.
I am not familiar with the notation $\mathbb E[X_1,X_2]\sim p(x_1,x_2)[X_1X_2]$.
– Math1000 Dec 17 '22 at 06:26