For two outcomes with probabilities and , Shannon entropy measures average uncertainty in bits. We use the continuous endpoint convention . Entropy is zero for a certain outcome and reaches one bit at , where neither outcome is more predictable than the other.当两个结果的概率分别为 和 时,香农熵以比特度量平均不确定性。端点按连续极限定义为 。结果确定时熵为零;在 时达到一比特,因为两个结果都没有更高的可预测性。
The lower strip divides a total probability of one into green and cyan . The moving gold point reads the entropy on the upper curve. Equal-length segments correspond to the maximum; moving toward either certain outcome lowers entropy.下方长条将总概率一分为绿色的 和青色的 。移动的金色点在上方曲线上标出对应熵值。两段等长时熵最大;无论向哪一侧的确定结果靠近,熵都会下降。