The entropy of the number of heads obtained when flipping a coin ten times

451 Views Asked by At

Suppose I flip a coin ten times. Let $Y$ be the discrete random variable describing the number of heads that I obtain. What is $H(Y)$?

Is the answer $10 \times -\dfrac{1}{2}\log_2 \left(\dfrac{1}{2}\right) = 5$?

1

There are 1 best solutions below

0
On

I'm not sure where you got that from. Let's recall that $$H(Y) = -\sum\limits_{k = 0}^{10} P(Y = k) \log_2 [P(Y =k)].$$

If you recall that $P(Y = k) = \binom{10}{k}(1/2)^{10}$, then you get $$H(Y) = -\sum\limits_{k = 0}^{10} \binom{10}{k}(1/2)^{10}\log_2 \left[\binom{10}{k}(1/2)^{10}\right] \approx 2.706.$$