Shannon entropy#Formal definitions