I have the problem:
A fair coin is tossed $n$ times. The random variables $X$ and $Y$ are defined by:
$X=$number of heads in the first $k$ tosses $(k<n)$
$Y=$number of heads in all $n$ tosses
The random variable $Z$ is $Y-X$. I must firstly work out the expected value of each random variable so I have worked it out as:
$E(X)=\frac k2$
$E(Y)=\frac n2$
And now I am not sure what $E(Z)$ would be? Would it simply be $\frac {n-k}{2}$?
I then must find $E(XZ)$ and hence $E(XY)$. Can anyone provide any help with this? If I have $E(Z)$ I am sure I could do it as I know that the random variables are not independent.
Yes $E(Z)=\frac {n-k}{2}$ as you can add and subtract expectations appropriately without worrying about independence
$X$ and $Z$ are independent so $E[XZ]=E[X]E[Z]$,
so $E[XY] = E[XX]+E[XZ]$ leaving you with a further calculation of $E\left[X^2\right]$