A fair coin is thrown three times in a row. We denote $X$ and $Y$, the number of times we obtain heads and tails in these three throws respectively.
I'm trying to find the correlation coefficient of $p(X,Y)$.
I know that $p(X,Y) = \frac{cov(X,Y)}{\sqrt{Var(X)Var(Y)}}$
we can quickly figure out that $X$ and $Y$ are binomially distributed and as such, the variance of $Bin(3, 0.5) = \frac{3}{4}$
So to simplify:
$$p(X,Y) = \frac{cov(X,Y)}{\sqrt{\frac{9}{16}}} = \frac{cov(X,Y)}{\frac{3}{4}} = \frac{4cov(X,Y)}{3}$$
Now I also know that the covariance $cov(x,y) = E[XY]-E[X]\cdot E[Y]$
Figuring $E[X]$ and $E[Y]$ is easy enough $n \cdot p = \frac{3}{2}$,
so
$cov(x,y) = E[XY]-\frac{9}{4}$
but I'm not sure how to go on about figuring $E[XY]$ out on this one. Would appreciate some help, thanks in advance!!
Best Answer
$E[XY]=E[X(3-X)]= 3 E[X] - E\left[X^2\right]$
By using formula for second moment of a binomial random variable,
$E[X^2] = n (n-1) p^2 + n p = \cfrac{6}{2^2} + \cfrac{3}{2} = 3$
Can you take it from here?