The Hungarian alphabet is 44 letters long and since we randomly select a letter from the Hungarian alphabet, each character is selected with equal probability. Therefore the probability of selecting any letter is P(〖 x〗_i)= 1/44 for letters〖 x〗_i
H(X)=− Σ_(ⅈ=1)^44(1/44 ) ⋅ log2 (1/44)
H(X)=−(44 × (1/44 ) ⋅ log2 (1/44))
H(X)= − log2 (1/44 )
H(X)=log2(44)
The entropy is: H(X) = 5.47
For choosing a random number between 1 and 10, there are 10 possible outcomes, each with an equal probability of 1/10 if we assume a uniform distribution.
H(X)=− Σ_(ⅈ=1)^10(1/10)⋅log2(1/10)
H(X)=−(10×(1/10)⋅log2(1/10))
H(X)=−log2(1/10 )
H(X)=log2(10)
The entropy is: H(X) = 3.32