# Thread: Expected Value and variance

1. ## Expected Value and variance

Independent observations X1......Xn are such that Xi belongs to {0.,1} and for some 0<theta<1, it is that Pr(Xi=1)=theta.

Let n1 be the number equal to 1.

Find the expected value and variance of n1?

2. ## Re: Expected Value and variance

Let's use k instead of $n_{1}$ and p instead of $\theta$ because they are 'more familiar'. The probability to have k ones among n variables is...

$P_{n,k}= a_{n,k}\ p^{k}\ (1-p)^{n-k}$ (1)

... where...

$a_{n,k} = \frac{n!}{k!\ (n-k)!}$ (2)

The expected value of k is then...

$\mu= \sum_{k=0}^{n} k\ P_{n,k}$ (3)

... and the variance...

$\sigma= \sqrt{\sum_{k=0}^{n} (k-\mu}^{2}\ P_{n,k}}$ (4)

Marry Christmas from Serbia

$\chi$ $\sigma$

3. ## Re: Expected Value and variance

Thank you so much