Kalman-and-Bayesian-Filters-in-Python icon indicating copy to clipboard operation
Kalman-and-Bayesian-Filters-in-Python copied to clipboard

Chapter 3: Variance of a Random Variable

Open hugolundin opened this issue 2 years ago • 0 comments

The derivation of variance of a random variable in chapter 3 could be clarified. At the moment, it is stated that the equation for computing variance is:

$$\mathit{VAR}(X) = \mathbb E[(X - \mu)^2]$$

And that the formula for expected value is $\mathbb E[X] = \sum\limits_{i=1}^n p_ix_i$, which can be substituted into the equation above to get:

$$\mathit{VAR}(X) = \frac{1}{n}\sum_{i=1}^n (x_i - \mu)^2$$

There is no explanation where the $\frac{1}{n}$ comes from. Earlier, it is stated that $$\mathbb E[X] = \sum_{i=1}^n p_ix_i = \frac{1}{n}\sum_{i=1}^n x_i = \mu_x$$

applies when the probabilities is all equal. However, whether that applies for the derivation is not clear.

hugolundin avatar Dec 29 '22 10:12 hugolundin