Covariance
The variance is the spread around the mean. To measure it, we use - the distance of each point to the mean. This then gives .
Why squared? otherwise the positive/negative distances cancel each other out (it’s mean squared distance).
Now Covariance is the exact same thing but one replaced by . Giving .
This measures how much variables move together (but only linearly - doesn’t pick up on ).
A few things hold:
- for independent (only holds in forward direction).
- .
- they add cleanly only when covariance vanishes.
- (bilinear and symmetric).
- this is the thing we need for our indicator-variable arguments.
Indicator Variables
For of indicator variables, computing gets easier, since indicators have a few special properties:
- .
- since only the case where both are survives.
Then .
- Variance of a Bernouilli variable
We also notice .
- this vanishes iff independent
Summing up
which comes out neatly to the following sum.
Variance of sum of indicators
where .
Note: the second sum has terms.
Note: we can cancel out the where are independent.
Symmetric terms
We can also simplify into since covariance is symmetric.
A shortcut
In practice, we usually compute the second moment .
Now this gives .
So . This means we only have to compute and a sum of the pairwise joint probabilities.