I trying to solve a quiz that asks the following.
The variable $X$ can be the values $1,2,3,...,n$ with the probabilities $\frac{1}{2^1}, \frac{1}{2^2},\frac{1}{2^3},...,\frac{1}{2^n}$
How can I calculate the entropy of $X$? Don't I have to know all the probability values of X?
Entropy is simply
$$H = -\sum_{k=1}^{n} p_k \log_2{p_k} = \sum_{k=1}^{n} k \: 2^{-k} = \frac{1/2}{(1 - 1/2)^2} - \frac{n (1/2)^{n+1}}{1-1/2} = 2 \left [ 1 - n 2^{-(n+1)} \right ] $$