How to apply the formula for Shannon entropy to a 4-sided die? I have come across calculating entropy, via the formula:
\begin{equation}
Entropy(p) = -\sum_{i=1} ^{N}p_i \log_2(p_i)
\end{equation}
Referring to this formula, how would I calculate the entropy of a fair 4 sided die for example?
I'm presuming 1/4 will be 'p', and 'i' will be the index?

The sum is over all possible outcomes, and $p_i$ are the probabilities for each. There are 4 outcomes, so the sum will run over each one of those - that is, $i$ will stand for a face of the die, and what will go in for $p_i$ will be the probability for the die to land with that face sticking up. For a fair die, that will be $\frac{1}{4}$ and then you will be right, the entropy will be $4 \left(-\frac{1}{4} \lg \frac{1}{4}\right) = \lg 4$ or 2 bits.
