# Variance of summation of Bernoulli variables

Let $$X_1,\ldots,X_n$$ be independent Bernoulli variables, with probability of success $$p_i$$ and let $$Y_n =\frac1n\sum\limits^n_{i=1} (X_i - p_i )$$

a) find the mean and variance of $$Y_n$$

b) show that for every $$a>0, \lim\limits_{n\to\infty} P(Y_n

Now for the mean, it was quite straightforward: $$E[Y_n]=0$$, however the variance not so much. they said $$Var(Y_N)= \dfrac{\sum_{i=1}^n p_i(1-p_i)}{n^2}$$ why did they not take out the summation as I have to do almost every time? is the same as $$\dfrac{Var(X_i)}{n^2}$$ ?

• It is the same. Jul 10 '13 at 9:55
• Incidentally, this type of random variable (generalization of Binomial r.v.) follow what is called a Poisson Binomial Distribution. Jul 10 '13 at 11:47

\begin{align} \mathbb{E}[Y_n] &=\dfrac{\sum^n_{i=1} (\mathbb{E}[X_i] - p_i )}{n}\\ & =0\\\end{align}
\begin{align} Var[Y_n]&=\mathbb{E}[Y_n^2]-\mathbb{E}^2[Y_n]\\ & =\mathbb{E}[Y_n^2]=\mathbb{E}[(\dfrac{\sum^n_{i=1} (X_i - p_i )}n)^2]\\ &=\frac1{n^2}\mathbb{E}[\sum^n_{i=1}\sum^n_{j=1}(X_i-p_i)(X_j-p_j)]\\ &=\frac1{n^2}\sum^n_{i=1}\sum^n_{j=1}\mathbb{E}[(X_i-p_i)(X_j-p_j)]\\ &=\frac1{n^2}(\underbrace{\sum^n_{i=1}\sum^n_{j \ne i,j=1}\mathbb{E}[(X_i-p_i)]\mathbb{E}[(X_j-p_j)]}_{=0 (i \ne j \Rightarrow X_i \bot X_j)}+\sum^n_{i=1}\mathbb{E}[(X_i-p_i)^2]\\ &=\frac1{n^2}\sum^n_{i=1}p_i(1-p_i) \end{align} note that $\mathbb{E}[.]$ is a linear operator

For a)

Hint 1: The mean of a Bernoulli variable with probability $p$ is $p$ and its variance is $p(1-p)$.

Hint 2: The variance of a sum of independent variables is the sum of the variances, and the variance of a constant times a variable is that constant squared times the variance of the variable.

If each of the $X_i$ had the same $p$, then $\sum\limits_{i=1}^np(1-p)=np(1-p)$ and we could simplify the variance to $np(1-p)/n^2=p(1-p)/n$. However, each $X_i$ has a possibly different $p_i$, so we have to keep the sum.

For b)

Hint: Note that $p(1-p)\le\frac14$ for any $p\in[0,1]$.

• The statement of your second hint is only true provided the r.v. are independent. Jul 10 '13 at 11:45
• @ClementC.: as they are stated to be, but I have added it.
– robjohn
Jul 10 '13 at 12:50