Edit Problem


E definition of variance
|
Moderate


Suppose $P (X \in\{1, 2, 3\})=1$ and $E[X]=2.5$. What are the smallest and largest possible values for the variance?

Solution:

Let $p = P(X = 1)$ and $q = P(x = 2)$. Then $P(X=3) = 1 - p - q$.

We can write the expectation as follows:

$2.5 = \sum_{x \in\{1, 2, 3\} } x P(X=x) = p + 2q + 3(1-p-q) = 3 - 2p - q$

This gives $q = .5 - 2p$. Since all probabilities are positive, we know $p \ge 0$ and $0 \le q = .5 - 2p$ or $p \le .25$. So $0 \le p \le .25$.

We can write the pmf of X as the following:

$$f_X(x) = \begin{cases} p, &x=1 \\ .5 - 2p, &x=2 \\ .5 + p, & x=3 \\ 0, &otherwise \end{cases}$$

We now write down the equation for variance,

$$var[X] = E[X^2] - (E[X])^2 = E[X^2] - 2.5^2$$

computing the first term,

$$E[X^2] = \sum_{x \in\{1, 2, 3\} } x^2 P(X=x) = 1 \cdot p + 4 (.5-2p) + 9 ( .5 + p) = 2p + 6.5 $$

Plugging in above,

$$var[X] = 2p + 6.5 - 2.5^2 = 2p + .25$$

Thus, the variance is a linear function of $p$. Since $p \ge 0$, $$var[X] \ge 2(0) + .25 = .25$$. Since $p \le .25$, $$var[X] \le 2(.25) + .25 = .75$$.

We have shown that $var[X]$ cannot be outside the interval $[.25,.75]$. To show that the end points are in fact, possible, we must write down examples of X that achieve them. To do this, we simply plug in $p=0$ and $p=.25$ and make sure that we get valid probability distributions:

For $p=0$,

$$f_X(x) = \begin{cases} 0, &x=1 \\ .5, &x=2 \\ .5, & x=3 \\ 0, &otherwise \end{cases}$$

For $p=.25$,

$$f_X(x) = \begin{cases} .25, &x=1 \\ 0, &x=2 \\ .75, & x=3 \\ 0, &otherwise \end{cases}$$

These are both valid probability distributions, so $.25$ is indeed the mimimum variance, and $.75$ is indeed the maximum variance.