Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

I am trying to study probability theory by myself. I asked myself a question about expectation, and I have no idea how to solve it. Please help me with solution and my understanding. The question I asked is following: Let $a, b, c, d$ be non-negative natural numbers, say from the set $\{0, 1, ..., n\}.$ Calculate the expectation $$ E\left( (-1)^{a+b+c+d}\right). $$

Thank you for your help.

share|cite|improve this question
You should say something about the probability distribution of your four random variables $a,b,c,d$. – Michael Hardy Feb 29 '12 at 3:32

$(-1)^{a+b+c+d} = (-1)^a (-1)^b (-1)^c (-1)^d$. Assuming $a,b,c,d$ are independent (which you didn't say but is probably what is meant), the expected value of the product is the product of the expected values. $(-1)^a$ is $-1$ if $a$ is odd and $1$ if $a$ is even. So if the values $0,1,\ldots,n$ are all equally likely (which again you didn't say but you probably meant), it all comes down to counting how many odd and even numbers there are in $0,1,\ldots,n$.

share|cite|improve this answer
...and that depends on whether $n$ is odd or even. If $n$ is odd, then there are equally many odd and even numbers, so $E((-1)^a)$ would be $0$. If $n$ is even, it's a bit more complicated. – Michael Hardy Feb 29 '12 at 3:34

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.