Shannon entropy measures the average information content (in bits) of a random variable. It is the lower bound on the average code length for lossless compression.