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 distribution of each outcome would be $[1/4,1/4/,1/4,1/4]$, i.e. $p_i=1/4$ for each $i\in \{1,2,3,4\}$. This yields $$H(p)=-4\times \frac{1}{4}\times\log_2\frac{1}{4}=2$$
As pointed out in the comments, the answer for an N-sided fair die would be $\log N$:
$$H(p)=-\sum_{i=1}^N\frac{1}{N} \log\frac{1}{N}=-\log \frac{1}{N}=\log N$$
This is true for log with any base, depending on the entropy definition used. In this particular problem, it is base $2$.
