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 given n independent Bernoulli trials, prob success = p. If X is # of successes, and Y is the number of failures, what is E(XY) and Cov(X,Y)? I was trying to use E(XY) - E(X)E(Y), the second component is easy, but I can't think of an easy way of finding E(XY) (maybe there isn't any?) Thanks!

share|cite|improve this question
up vote 2 down vote accepted

The number of successes and failures have to add up to $n$, i.e. $X+Y=n$, so you can write

$$E[XY] = E[X(n-X)] = E[nX - X^2] = nE[X] - E[X^2]$$

Does that help?

share|cite|improve this answer
Ahh brilliant! I did try to use the sum in calculation, but didn't think that substitution will make it that much easier... Thanks! – problab Nov 18 '11 at 8:10

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.