Entrophy

Based on the task that was given I needed to compute the entrophy of a random event. The event that I choose is:dice roll. We assume that we’ve got a fair six sided that, that we want to roll once. There are six possibilities:1,2,3,4,5,6.

H=−∑i p(i)log2(p(i))

Dice roll p1=p2=p3=p4=p5=p6=1/6 pi=1/6 H=−1/6log2(1/6)−1/6log2(1/6)−1/6log2(1/6)−1/6log2(1/6)−1/6log2(1/6)−1/6log2(1/6) H=-1/6(-2.58)-1/6(-2.58)-1/6(-2.58)-1/6(-2.58)-1/6(-2.58)-1/6(-2.58) H=0.43+0.43+0.43+0.43+0.43+0.43

H=2.58