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

Is there some basic examples to show that there are difference meaning between X and E(X) in the covariance formula?

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

Suppose $X$ and $Y$ are random variables which can take the following pairs of values with the following probabilities

X   Y    Probability
10  20      0.6 
30  50      0.3 
40  10      0.1

Then $E[X]$, the expected value of $X$, is $0.6 \times 10 + 0.3 \times 30 +0.1 \times 40 = 19$.

Similarly $E[Y]$, the expected value of $X$, is $0.6 \times 20 + 0.3 \times 50 +0.1 \times 10 = 28$.

So the covariance $E\left[(X-E[X])(Y-E[Y])\right]$, the expected value of the products of the differences between the random variables and their expected values, is $$0.6 \times (10-19)\times (20-28) + 0.3 \times (30-19)\times ( 50-28)+0.1 \times (40 -19) \times (10-28) = 78.$$

share|cite|improve this answer

The value $X$ represents a randomly-varying quantity. The value $E(X)$, if known, represents its average. For example, toss a fair coin 100 times and let $X$ denote the number of heads you see. In this case, if the coin is fair, you would reasonably expect $E(X) = 50$. The value $X$ will vary around 50 as you repeat the experiment.

share|cite|improve this answer
When you say "average", there is a difference between the population average or expectation and the sample average – Henry Sep 3 '12 at 23:36
Yes. $E(X)$ refers to a population average. A sample average is still a random quantity. Repeated trials will, in general, yield varying results. – ncmathsadist Sep 3 '12 at 23:38

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.