Documentation

Mathlib.MeasureTheory.Measure.LogLikelihoodRatio

Log-likelihood Ratio #

The likelihood ratio between two measures μ and ν is their Radon-Nikodym derivative μ.rnDeriv ν. The logarithm of that function is often used instead: this is the log-likelihood ratio.

This file contains a definition of the log-likelihood ratio (llr) and its properties.

Main definitions #

noncomputable def MeasureTheory.llr {α : Type u_1} {mα : MeasurableSpace α} (μ : MeasureTheory.Measure α) (ν : MeasureTheory.Measure α) (x : α) :

Log-Likelihood Ratio between two measures.

Equations
Instances For
    theorem MeasureTheory.llr_tilted_left {α : Type u_1} {mα : MeasurableSpace α} {μ : MeasureTheory.Measure α} {ν : MeasureTheory.Measure α} {f : α} [MeasureTheory.SigmaFinite μ] [MeasureTheory.SigmaFinite ν] (hμν : MeasureTheory.Measure.AbsolutelyContinuous μ ν) (hf : MeasureTheory.Integrable fun (x : α) => Real.exp (f x)) (hfν : AEMeasurable f) :
    MeasureTheory.llr (μ.tilted f) ν =ᶠ[MeasureTheory.Measure.ae μ] fun (x : α) => f x - Real.log (∫ (z : α), Real.exp (f z)μ) + MeasureTheory.llr μ ν x
    theorem MeasureTheory.integral_llr_tilted_left {α : Type u_1} {mα : MeasurableSpace α} {μ : MeasureTheory.Measure α} {ν : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsProbabilityMeasure μ] [MeasureTheory.SigmaFinite ν] (hμν : MeasureTheory.Measure.AbsolutelyContinuous μ ν) (hf : MeasureTheory.Integrable f) (h_int : MeasureTheory.Integrable (MeasureTheory.llr μ ν)) (hfμ : MeasureTheory.Integrable fun (x : α) => Real.exp (f x)) (hfν : AEMeasurable f) :
    ∫ (x : α), MeasureTheory.llr (μ.tilted f) ν xμ = ∫ (x : α), MeasureTheory.llr μ ν xμ + ∫ (x : α), f xμ - Real.log (∫ (x : α), Real.exp (f x)μ)
    theorem MeasureTheory.llr_tilted_right {α : Type u_1} {mα : MeasurableSpace α} {μ : MeasureTheory.Measure α} {ν : MeasureTheory.Measure α} {f : α} [MeasureTheory.SigmaFinite μ] [MeasureTheory.SigmaFinite ν] (hμν : MeasureTheory.Measure.AbsolutelyContinuous μ ν) (hf : MeasureTheory.Integrable fun (x : α) => Real.exp (f x)) :
    MeasureTheory.llr μ (ν.tilted f) =ᶠ[MeasureTheory.Measure.ae μ] fun (x : α) => -f x + Real.log (∫ (z : α), Real.exp (f z)ν) + MeasureTheory.llr μ ν x
    theorem MeasureTheory.integral_llr_tilted_right {α : Type u_1} {mα : MeasurableSpace α} {μ : MeasureTheory.Measure α} {ν : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsProbabilityMeasure μ] [MeasureTheory.SigmaFinite ν] (hμν : MeasureTheory.Measure.AbsolutelyContinuous μ ν) (hfμ : MeasureTheory.Integrable f) (hfν : MeasureTheory.Integrable fun (x : α) => Real.exp (f x)) (h_int : MeasureTheory.Integrable (MeasureTheory.llr μ ν)) :
    ∫ (x : α), MeasureTheory.llr μ (ν.tilted f) xμ = ∫ (x : α), MeasureTheory.llr μ ν xμ - ∫ (x : α), f xμ + Real.log (∫ (x : α), Real.exp (f x)ν)