Entropy Function

Calculation of entropy


Description

The function \(Entropy\) calculates the entropy of a list of values in bits.

In statistical mechanics, entropy is a measure of the number of microstates that are energetically equivalent in the given macrostate. Macrostates of higher entropy have more microstates and are therefore statistically more likely than macrostates of lower entropy. Therefore, the internal processes in a system, on a statistical average, that the system approaches the macrostate, which has the highest possible entropy for the same energy.

For example, when melting ice, the ordered ice crystal structure is transformed into a disordered movement of individual water molecules: The entropy of the water in the ice cube increases.


Syntax

Entropy (List)

Example

a=[3,4,8]

Entropy(a)= 1.58