H ( X ) = E ⁡ [ log b ⁡ ( 1 p ( X ) ) ] ≤ log b ⁡ ( E ⁡ [ 1 p ( X ) ] ) = log b ⁡ ( n ) {\displaystyle \mathrm {H} (X)=\operatorname {E} \left[\log _{b}\left({\frac {1}{p(X)}}\right)\right]\leq \log _{b}\left(\operatorname {E} \left[{\frac {1}{p(X)}}\right]\right)=\log _{b}(n)} .[1]:29 This maximal entropy of logb(n) is effectively attained by a source alphabet having a uniform probability distribution: uncertainty is maximal when all possible events are equiprobable.