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

For my Homework I have four values: $N_1, N_2, A, C$.
Two values are chosen at random without replacement. X denotes how many N values are chosen.

$$P(x=0) = \frac16 \qquad P(x=1) = \frac23 \qquad P(x=2) = \frac16 $$

find the mean and variance.

I have taken the mean to be $\frac{(0+1+2)}{3} = \frac33 = 1$ However, I think this is wrong, and that the distribution must be taken into account.

The Variance is to be determined by the equation $ \text {Var}(x)=E(x^2)-E(x)^2$ However I am not certain what value to assign $x$.

share|cite|improve this question
Use capital letters, $X$ is a random variable. You are right, $E(X)=1$. Now let's deal with $E(X^2)$. The random variable $X^2$ takes on values $0$, $1$, $4$ with probabilities respectively $1/6$, $2/3$, $1/6$, so you should be able to find $E(X^2)$. – André Nicolas Sep 21 '11 at 23:40
Your mean is correct, but I suspect from your comments that this is a coincidence. You do have to take the distribution into account. The correct calculation is $0\cdot\frac16+1\cdot\frac23+2\cdot\frac16 = \frac23+\frac13=1$. You can use the same idea to calculate $E(X^2)$: multiply each possible value by its probability and add up the results. – Brian M. Scott Sep 22 '11 at 0:04
Let $W$ be a random variable that takes the values $w_1, w_2, \dots, w_n$ with probabilities $p_1, p_2, \dots,p_n$. Then $E(W)=w_1p_1+w_2p_2+\cdots +w_np_n$. – André Nicolas Sep 22 '11 at 6:09
up vote 1 down vote accepted

For any function $f$, the expectation of $f(X)$ is given by: $\newcommand{\E}{\mathrm{E}}$ $$ \E(f(X)) = \sum_{i=0}^2 \ \Pr[X = i] \cdot f(i) = \sum_{i=0}^2 \ p_i f(i) .$$

The expectation of $X$ is $$ \E(X) = 0 \cdot p_0 + 1 \cdot p_1 + 2 \cdot p_2 = \frac{1}{6} \cdot 0 + \frac{2}{3} \cdot 1 + \frac{1}{6} \cdot 2 = 1. $$ $$ \E(X^2) = 0 \cdot p_0 + 1^2 \cdot p_1 + 2^2 \cdot p_2 = \frac{1}{6} \cdot 0^2 + \frac{2}{3} \cdot 1^2 + \frac{1}{6} \cdot 2^2 = \frac{4}{3}. $$ The variance of $X$ is $$ \mathrm{Var}(X) = \E(X^2) - \E(X)^2 = \frac{4}{3} - 1^2 = \frac{1}{3}. $$

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.