Why is ln(p_i) not rounded down in theexpression for Shannon entropy?

125 Views Asked by At

Entropy supposedly " is the average amount of information contained in each message received"(Wikipedia: Entropy). However, to calculate the Shannon entropy for a finite sample, we have the sum over the of -p_i(log p_i). However, for each i, the amount of information possible is a positive number of bits, so for one instance one must round down to the nearest integer. Thus I would expect the total sum to be composed of integers; i.e., each term in the sum would be FL(-p_i(log p_i)), where FL is the floor function. Why isn't it?

A similar question then comes up when one considers the properties of the information function I so that I(p)I(q)= I(pq).