Follow @ProbabilityPuz |

Machine Learning: The Art and Science of Algorithms that Make Sense of Data

A: The expected number of heads if you chose box A is easy to calculate as

$$

E(\text{heads}| A) = \frac{1}{2} + \frac{1}{2} = 1

$$

However the expected number of heads if you chose box B is also the same

$$

E(\text{heads}| B) = \frac{4}{10} + \frac{6}{10} = 1

$$

The average yield being the same could make one think that both boxes yield the same. However there is one difference, its the variance. The variance of a distribution of a random variable \(X\) is defined as

$$

Var(X) = \sum_{i=0}^{N} (x_i - \bar{x})^{2}p_i

$$

where \(p_i\) is the probability of \(x_i\). Given this, lets compute the variance of each strategy

$$

Var(X | \text{Box=A}) = (\frac{1}{2} - 1)^2 \frac{1}{2} + (\frac{1}{2} - 1)^2 \frac{1}{2} = \frac{1}{4} = 0.25 \\

Var(X | \text{Box=B}) = (\frac{2}{5} - 1)^2 \frac{2}{5} + (\frac{3}{5} - 1)^2 \frac{3}{5} = \frac{6}{25} = 0.24

$$

The variance for box B is slightly tighter than box A which makes choosing the coins in box B a better strategy.

If you are looking to buy some books on probability theory here is a good list.

## No comments:

## Post a Comment