Answer
:
E[X]=21,
E[Y]=0,
E[XY]=0
The original concludes that
X,Y are independent. The table actually shows dependence: when X is zero, Y is always zero, whereas the marginal probability of Y being zero is one half. The stated expectation of the product is still zero, as the contributions from the two nonzero products cancel.
P(X=i∣X+Y=n) is the probability that, given the second head occurs on toss
n, the first occurs on toss
i.
Intuitively, if the second head occurs on toss
n, the first head is equally likely on any toss from
1 to
n−1.
For a formal proof, start with the following.
P(X=i∣X+Y=n)=P(X+Y=n)P(X=i and X+Y=n)=P(X+Y=n)P(X=i)P(Y=n−i)
Also,
P(X=i)=p(1−p)i−1 (
i≥1) and ,
P(Y=n−i)=p(1−p)n−i−1 (
n−i≥1).
Therefore,
P(X=i)P(Y=n−i)=p2(1−p)n−2 (
i=1,…,n−1) and , zero otherwise.
Therefore,
P(X=i∣X+Y=n)=P(X=j∣X+Y=n) holds for any
i and
j from
1 to
n−1.
P(X=i∣X+Y=n)=n−11,i=1,…,n−1