Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $X_1, X_2,.... X_{n+1}$ be a sequence of independent identically distributed random variables taking the value $1$ with probability $p$ and $0$ with probability $1-p$. Let $Y_k = 0$ if $X_k + X_{k+1}$ is even and $Y_{k} = 1$ if $X_k + X_{k+1}$ is odd. The aim is to find the expectation and variance of $Y_1 +....+ Y_n$. This is one of the statistics qualifying exam problem from previous years and I am just curious as to how to begin solving it. Any help, however small, is much appreciated

share|cite|improve this question
Welcome to math.SE: since you are new, I wanted to let you know a few things about the site. In order to get the best possible answers, it is helpful if you say in what context you encountered the problem, and what your thoughts on it are; this will prevent people from telling you things you already know, and help them give their answers at the right level. If this is homework, please add the homework tag; people will still help, so don't worry. Also, many find the use of imperative ("Prove", "Solve", etc.) to be rude when asking for help; please consider rewriting your post. – Did Sep 9 '12 at 20:29
In view of your Edit: any personal thoughts? – Did Sep 9 '12 at 21:25
I have had to put this on the back burner in lieu of other commitments. When I saw your comments I realized i need to brush up on my knowledge of covariance and multiple rv's. I will post once I have looked into those topics and figured something out. Thanks for your help :) – allgored Sep 13 '12 at 17:39


  • For every $k$, $\mathrm E(Y_k)=\mathrm P(Y_k=1)=\mathrm P(X_k\ne X_{k+1})=q$, where $q$ is defined as $q=\mathrm P(X_1\ne X_2)$.
  • For every $k$, $\mathrm E(Y_k)=\mathrm E(Y_k^2)$.
  • For every $k$ and $i$ such that $|k-i|\geqslant2$, $\mathrm{Cov}(Y_k,Y_i)=0$.
  • For every $k$, $\mathrm{Cov}(Y_k,Y_{k+1})=\mathrm P(Y_k=Y_{k+1}=1)-q^2$.
  • For every $k$, $\mathrm P(Y_k=Y_{k+1}=1)=\mathrm P(X_k\ne X_{k+1},X_{k+1}\ne X_{k+2})=r$, where $r$ is defined as $r=\mathrm P(X_1\ne X_2,X_2\ne X_3)$.

Now, you might be able to compute $q$ and $r$ as functions of the parameter $p$ and to collect all these basic facts to reach the expectation and the variance of $Y_1+Y_2+\cdots+Y_n$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.