Post
Topic
Board Development & Technical Discussion
Merits 17 from 4 users
Re: How can you verify the randomness that's coming from a hardware?
by
n0nce
on 10/05/2022, 00:37:30 UTC
⭐ Merited by Welsh (6) ,LoyceV (4) ,ETFbitcoin (4) ,vapourminer (3)
Rolling a dice gives certainly more than 2 bits uncertainty, since 2 bits is one of 4 choices, while the dice is one in 6.
I don't follow. In 4 out of the 6 results, it gives 2 bits (00, 01, 10, 11) while in 2 out of the 6 results, it gives 1 bit (0, 1). Isn't this (4*2 + 2*1)/6 = 10/6 = 1.666 bits in each result on average?
Oh no, no, no, you can't do that! Grin You can't just split and add probabilities at will.

Entropy works like this:



So, of course, in our case P(xi) is always 1/6 and we get
H(X) = -1 * (1/6*log2(1/6))*6
     = -1 * 1/6 * 6 * (log2(1/6))
     = -1 * -2.5849625...
     = 2.5849625...