Documentation

CslibFrontier.Probability.Entropy.Fano

Fano's inequality #

Fano's inequality bounds the entropy left in a hidden value by the probability that it is guessed wrongly Cover and Thomas, Section 2.10, the corollary to Theorem 2.10.1. If an estimator g recovers a value X : α from an observation Y except with probability Pe = Pr[g Y ≠ X], then H(X | Y) ≤ h₂(Pe) + Pe log₂ (|α| - 1), where h₂(e) = Real.binEntropy e / Real.log 2 is the binary entropy in bits. This is the sharper |α| - 1 form of that corollary, for deterministic estimators g Y with values in α; it implies the theorem's Pe log₂ |α| form for them. Joint laws list the observation first, as for Cslib.Probability.PMF.conditionalEntropy.

The proof averages the unconditional inequality H(q) ≤ h₂(1 - q a) + (1 - q a) log₂ (|α| - 1), for one law q and one guess a, over the conditional laws of X given Y = y. The unconditional inequality is concavity of x ↦ -x log x on the outcomes other than a; averaging uses concavity of Real.binEntropy (Jensen's inequality). This is not the textbook proof, which expands H(E, X | Y) for the error indicator E by the chain rule in two ways; the statement is the same.

Main results #

References #

The entropy of a bit is the binary entropy, in bits, of its probability of being true.

A coin showing true with probability p carries h₂(p) bits of entropy.

theorem Cslib.Probability.PMF.entropy_le_binEntropy_add_mul_logb {α : Type u_1} [Fintype α] (q : PMF α) (a : α) :
entropy q ≤ Real.binEntropy (1 - (q a).toReal) / Real.log 2 + (1 - (q a).toReal) * Real.logb 2 (↑(Fintype.card α) - 1)

Fano's inequality without side information Cover and Thomas, Section 2.10, the remark after Theorem 2.10.1: if the guess a misses a sample of q with probability e = 1 - q a, then H(q) ≤ h₂(e) + e log₂ (|α| - 1).

theorem Cslib.Probability.PMF.conditionalEntropy_le_binEntropy_add_mul_logb {α : Type u_1} {β : Type u_2} [Finite β] [Fintype α] (joint : PMF (β × α)) (g : β → α) :
conditionalEntropy joint ≤ Real.binEntropy (joint.toOuterMeasure {z : β × α | g z.1 ≠ z.2}).toReal / Real.log 2 + (joint.toOuterMeasure {z : β × α | g z.1 ≠ z.2}).toReal * Real.logb 2 (↑(Fintype.card α) - 1)

Fano's inequality Cover and Thomas, Section 2.10, the corollary to Theorem 2.10.1: for a joint law of an observation Y : β and a hidden value X : α, listed observation first, and an estimator g : β → α erring with probability Pe = Pr[g Y ≠ X], H(X | Y) ≤ h₂(Pe) + Pe log₂ (|α| - 1). This is the sharper |α| - 1 form, for deterministic estimators with values in α.

theorem Cslib.Probability.PMF.conditionalEntropy_map_le_binEntropy_add_mul_logb {α : Type u_1} {β : Type u_2} {Ω : Type u_3} [Finite β] [Fintype α] (ν : PMF Ω) (X : Ω → α) (Y : Ω → β) (g : β → α) :
conditionalEntropy (PMF.map (fun (ω : Ω) => (Y ω, X ω)) ν) ≤ Real.binEntropy (ν.toOuterMeasure {ω : Ω | g (Y ω) ≠ X ω}).toReal / Real.log 2 + (ν.toOuterMeasure {ω : Ω | g (Y ω) ≠ X ω}).toReal * Real.logb 2 (↑(Fintype.card α) - 1)

Fano's inequality for random variables X : Ω → α and Y : Ω → β on a probability space ν, with the estimate g ∘ Y of X: H(X | Y) ≤ h₂(Pe) + Pe log₂ (|α| - 1), where Pe = Pr[g (Y ω) ≠ X ω].

theorem Cslib.Probability.PMF.conditionalEntropy_le_one_add_mul_logb {α : Type u_1} {β : Type u_2} [Finite β] [Fintype α] (joint : PMF (β × α)) (g : β → α) :
conditionalEntropy joint ≤ 1 + (joint.toOuterMeasure {z : β × α | g z.1 ≠ z.2}).toReal * Real.logb 2 ↑(Fintype.card α)

Fano's inequality, weak form: H(X | Y) ≤ 1 + Pe log₂ |α|.