After the dry, algebraic discussion of the previous section it is a relief to finally be able to compute some variances.
🎥 Variance of a Sum
13.3.1The Variance of a Sum¶
Let be random variables with sum
The variance of the sum is
We say that the variance of the sum is the sum of all the variances and all the covariances.
The first sum has terms.
The second sum has terms.
Since , the second sum can be written as . But we will use the form given above.
13.3.2Sum of Independent Random Variables¶
If are independent, then all the covariance terms in the formula above are 0.
Therefore if are independent, then
Thus for independent random variables , both the expectation and the variance add up nicely:
When the random variables are i.i.d., this simplifies even further.
🎥 Variance of IID Sample Sum
13.3.3Sum of an IID Sample¶
Let be i.i.d., each with mean and . You can think of as draws at random with replacement from a population, or the results of independent replications of the same experiment.
Let be the sample sum, as above. Then
This implies that as the sample size increases, the distribution of the sum shifts to the right and is more spread out. The expectation goes up linearly in , but the SD goes up more slowly.
Answer
(a) 250
(b) 19
Here is an important application of the formula for the variance of an i.i.d. sample sum.
13.3.4Variance of the Binomial¶
Let have the binomial distribution. We know that
where are i.i.d. indicators, each taking the value 1 with probability . Each of these indicators has expectation and variance . Therefore
For example, if is the number of heads in 100 tosses of a coin, then
Here is the distribution of . You can see that there is almost no probability outside the range .
k = np.arange(25, 75, 1)
binom_probs = stats.binom.pmf(k, 100, 0.5)
binom_dist = Table().values(k).probabilities(binom_probs)
Plot(binom_dist, show_ev=True, show_sd=True)
Answer
Expectation 7.5, SD 2.5
🎥 Binomial and Poisson Variance
13.3.5Variance of the Poisson, Revisited¶
We showed earlier that if has the Poisson distribution then , , and . Now we have a way to understand the formula for the SD.
One way in which a Poisson distribution can arise is as an approximation to a binomial distribution where is large, is small, and . The expectation of the binomial becomes the parameter of the approximating Poisson distribution, which is also the expectation of the Poisson.
Now let’s compare the standard deviations. The standard deviation of the binomial is
But in this setting, so the SD of the binomial is approximately . That’s the SD of its approximating Poisson distribution.