# Homework Help: Variance of binomial distribution - 1 trial

1. Jul 31, 2012

### operationsres

1. The problem statement, all variables and given/known data

For n trials, $S_n$ can be seen as the sum of n independent single trials $X_i$, i = 1,2,...,n, with $\mathbb{E}[X_i]$=p and Var$[X_i]=p(1-p)$.

2. What I don't understand

I don't understand why Var$[X_i]=p(1-p)$.

We know that: Var$[X_i]=\mathbb{E}[(X_i - \mathbb{E}[X_i])^2] = \mathbb{E}[X_i^2 - 2X_i\mathbb{E}[X_i] + \mathbb{E}[X_i]^2] = \mathbb{E}[X_i^2] - \mathbb{E}[X_i]^2$.

Taking $\mathbb{E}[X_i]^2$, we have $\mathbb{E}[X_i]^2=p^2$.

Taking $\mathbb{E}[X_i^2]$, we have $\mathbb{E}[X_i^2]=\mathbb{E}[\prod_{i=1}^2X_i] = \prod_{i=1}^2 \mathbb{E}[X_i] = \mathbb{E}[X_i]^2 = p^2$.

So Var$[X_i]= p^2 - p^2 = 0 \not= p(1-p)$, which contradicts what my lecture notes say.

2. Aug 1, 2012

### Ray Vickson

No, $E X_i^2 \neq p^2.$ In fact, $E f(X_i) = \sum_{k} P\{X_i = k\} f(k)$ for any function f, so we get $E X_i^2 = p.$

RGV

3. Aug 1, 2012

### operationsres

Enlightening post, thank you.

I guess my error was assuming that X_i was independent in:
$\mathbb{E}[X_i^2]=\mathbb{E}[\prod_{i=1}^2X_i] = \prod_{i=1}^2 \mathbb{E}[X_i] = \mathbb{E}[X_i]^2 = p^2$.

?

But they're the same event so that would be non-sensical....

4. Aug 1, 2012

### voko

Use the definition of variance of a discrete variable.