Entropy H(p)
Cross-entropy H(p,q)
Mismatch cost DKL(p || q)
Z = 0
Z = 1
H(p, q) = H(p) + DKL(p || q)
Bar length is the ideal code length −log₂ q(z); p determines how often each bar is paid.