Find $\mathbb{E}(X^2 - X)$ and $\text{Var}(X)$ with binomial distribution

47 Views Asked by At

$n \in \mathbb{N}, p \in (0, 1), X \sim \text{Bin}(n, p)$.

  1. Find $\mathbb{E}(X^2 - X)$. Hint: for which $k \in \{0, 1, \dots, n\}$ is $k^2 - k = 0$?
  2. Use the above to find $\text{Var}(X)$.

My answer:

  1. It is linear so: $$ \mathbb{E}(X^2 - X) = \mathbb{E}(X^2) - \mathbb{E}(X) $$ We can find $\mathbb{E}(X^2)$ with the formula for $Var(x)$: \begin{align*} \operatorname{Var}(X) & = \mathbb{E}(X^2) - \mathbb{E}(X)^2 \\ \mathbb{E}(X^2) &= \operatorname{Var}(X) + \mathbb{E}(X)^2 \\ &= np(1-p) + (np)^2 \\ &= np - np^2 + n^2p^2 \end{align*}

Now we can calculate $\mathbb{E}(X^2 - X)$ in $n$ and $p$:

\begin{align*} \mathbb{E}(X^2 - X) &= \mathbb{E}(X^2) - \mathbb{E}(X) \\ &= (np - np^2 + n^2p^2) - np \\ &= -np^2 + n^2p^2 \\ &= (np)^2 - np^2 \end{align*}

  1. I don't understand the question? I have already calculated $\text{Var}(X)$ right?
1

There are 1 best solutions below

7
On BEST ANSWER

My guess is the hint intended for you to write $X$ as a sum of independent and identically distributed Bernoulli random variables $B_i$:

$$X^2-X=\left(\sum_i B_i \right)^2-\sum_i B_i=\sum_i B_i^2+\sum_{i\neq j} B_iB_j -\sum_i B_i=\sum_{i\neq j} B_iB_j,$$

where the final equality uses the hint ($B_i^2-B_i=0$ since $B_i$ takes values $1,0$).

Hence,

$$E[X^2-X]=\sum_{i\neq j} E[B_i]E[B_j]=\sum_{i\neq j} p^2=(n^2-n)p^2.$$

From here, compute the variance using the approach you did for part 1.