Probability - Variance
This is the measure of the deviation from the expected value (Probability - Mean)
Sample variance
If we call the average value
We square the difference in this formula so that negative numbers (when
Because of this, the units of the variance are squared from the input units. We express sample variance with
True variance
Let's write this considering the true mean (expectation), not just the sample average:
We can apply this square over the square brackets to get the following:
As we proved last week and recorded in our Important Formulas, the expectation of a sum is the sum of its expectations. We can apply this here to break these apart:
Given that
In terms of the sample variance from earlier, this could be expressed as:
(or, drawn a bit bigger to make the bar positions clear:)
This reminds of Jensen's Inequality, described in part one (it matters what order you take the average in with a function). This was described in the context of Hardy-Weinberg Equilibrium.
Sum of variances
Similar to the expectations, when variances are independent then the "sum of variances is equal to the variance of the sum". This also will go in our Important Formulas:
Since variance has no sign, it's also true that:
If
- A positive correlation between them will give
- A negative correlation will give
- No correlation (independence) - they are equal.
Coefficient with variance
Because:
From our rule about expectation with a coefficient, we can extract
Now the part in brackets is just equal to
Sample Average
To recap, our sample average
Let's find the expectation of the sample average:
Based on our rule for coefficients in the expectation:
Since the sum of expectations = expectation of sums, we can also move the sum sign outside the expectation:
Let's compare with the true expectation formula we derived earlier...
Honestly looking back at my notes this proof doesn't make much sense, but I will copy my notes here. I think this site explained this proof better.
I wrote: "we are adding up the values from 1 to
Now, we combine this with the earlier formula for
Therefore, the expectation of the sample average (AKA the population mean) is the same as the true mean. This is going in our Probability - Important Formulas - it is very important in statistics.
Variance of the sample average
Based on the variance of coefficient rule:
If each result is indepedent from the others, we can use the sum of variances rule to move the sum outside. However, this only works if each record in our dataset is independent and is not influenced by previous records.
Examples of how previous records could influence the next one, causing a correlation that makes this proof not true:
- Stopping a survey once you receive too many answers
- Asking a survey respondent to introduce you to more people to survey
Now, just like with the expectation, we can use this to show how sample variance relates to the true variance:
This is another one of our Probability - Important Formulas. It's important to note that the true variance of a population depends on sample size
Standard Error
We already showed how taking the square root of the variance is important to get the standard deviation (SD,
Sample Variance - formula
When you have a limited sample, use this formula. We divide by
There was a long part proving this that I didn't really understand. Somehow, we get this formula, which comes from the difference between the true variance and the expectation of the sample variance somehow, then rearrange it:
Then this turns somehow into the sample variance formula above.
I guess that since