Consider a sequence of Bernoulli trials with the probability of success $p$. Suppose you started the game with a run of successes followed by the run of failures (note that you can learn that unlucky run is over if and only if it is followed by a success). Let the random variable $X$ be the number of successful trials and $Y$ be the number of unsuccessful ones (we count as a run any sequence of one or more identical outcomes). Find
(b) Mean lengths of both runs, i.e. $E(X)$ and $E(Y)$.
(c) The correlation function of $E(XY)$.
(d) The covariance $\operatorname{Cov}(X,Y)$.
I am confused as I know it is a geometric distribution, and get confused as to how to go about doing this :/
Thanks for any help.