<s>[INST] Joint distribution of X and Y bernoulli random variables A box contains two coins: a regular coin and a biased coin with $P(H)=\frac23$. I choose a coin at random and toss it once. I define the random variable X as a Bernoulli random variable associated with this coin toss, i.e., X=1 if the result of the coin toss is heads and X=0 otherwise. Then I take the remaining coin in the box and toss it once. I define the random variable Y as a Bernoulli random variable associated with the second coin toss.
a)Find the joint PMF of X and Y.
b)Are X and Y independent?
My attempt to answer this question:
Let A be the event that first coin, I pick is the regular(fair) coin. Then conditioning on that event, I can find joint PMF. Once conditioned, I can decide if X and Y are independent(conditionally).
$P(A)=\frac12,P(A^c)=\frac12$.
In the event A, $P(X=1)=\frac12,P(Y=1)=\frac23$.
In the event$A^c, P(X=1)=\frac23, P(Y=1)=\frac12$
So, $P_{X,Y}(x,y)= P(X=x, Y=y|A)P(A) + P(X=x, Y=y|A^c)P(A^c)$
$P_{X,Y}(x,y)=P_{\frac12}(x)P_{\frac23}(y)(\frac12) + P_{\frac23}(x)P_{\frac12}(y)(\frac12)$
Now, how can we find Joint PMF of X and Y using Bernoulli distribution?
 [/INST] The joint pmf can be described by a 2-by-2 contingency table that shows the probabilities of getting $X=1$ and $Y=1$, $X=1$ and $Y=0$, $X=0$ and $Y=1$, $X=0$ and $Y=0$.
So you'll have:





$X=0$
$X=1$




$Y=0$
$\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{1}{3}+\frac{1}{2}\cdot\frac{1}{3}\cdot\frac{1}{2}=\frac{1}{6}$
$\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{1}{3}+\frac{1}{2}\cdot\frac{2}{3}\cdot\frac{1}{2}=\frac{1}{4}$


$Y=1$
$\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{2}{3}+\frac{1}{2}\cdot\frac{1}{3}\cdot\frac{1}{2}=\frac{1}{4}$
$\frac{1}{2}\cdot\frac{1}{2}\cdot\frac{2}{3}+\frac{1}{2}\cdot\frac{2}{3}\cdot\frac{1}{2}=\frac{1}{3}$



</s>