我想知道......
在重复的硬币翻转中,¿如何计算随机变量X的熵,该熵代表在第一次获得“头部”之前要做的翻转次数?
答案 0 :(得分:2)
变量X
可以取1到无穷大的任意数字。概率是:
p(X = i) = (1/2)^i
熵是:
H = - Sum {i from 1 to infinity} ( p(X = i) * log2(p(X = i)) )
= - Sum {i from 1 to infinity} ( 1/2^i * log2(1/2^i) )
= - Sum {i from 1 to infinity} ( 1/2^i * i * log2(1/2) )
= Sum {i from 1 to infinity} ( 1/2^i * i )
解决这个问题:
H = 2 bit