The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V20. Probability

Mathlib.Probability.Distributions.Poisson.Basic

20 declarations. Mathlib docs · Source

Poisson distributions over ℕ

Define the Poisson measure over the natural numbers. For r : ℝ≥0, poissonMeasure r is the measure which to {n} associates exp (-r) * r ^ n / (n)!.

Main definition

  • poissonMeasure r: a Poisson measure on ℕ, parametrized by its rate r : ℝ≥0.

Main results

  • poissonMeasure_conv_poissonMeasure: Poisson(r₁) ∗ Poisson(r₂) = Poisson(r₁ + r₂).
  • IndepFun.hasLaw_add_poissonMeasure: the sum of two independent Poisson random variables is again Poisson.

Convolution of Poisson measures

def ProbabilityTheory.poissonMeasure E3 #

NNReal → MeasureTheory.Measure ℕ

The poisson measure with rate r : ℝ≥0 as a measure over ℕ.

def ProbabilityTheory.«termPo(_)» E1 #

Lean.ParserDescr

The Poisson probability distribution with rate r.

def ProbabilityTheory.«termPo(_,_)» E1 #

Lean.ParserDescr

The Poisson probability distribution with rate r valued in the AddMonoidWithOne R.

theorem ProbabilityTheory.poissonMeasure_singleton E1 #

∀ (r : NNReal) (n : ℕ),
  (ProbabilityTheory.poissonMeasure r) {n} = ENNReal.ofReal (Real.exp (-↑r) * ↑r ^ n / ↑n.factorial)

theorem ProbabilityTheory.poissonMeasure_real_singleton E1 #

∀ (r : NNReal) (n : ℕ), (ProbabilityTheory.poissonMeasure r).real {n} = Real.exp (-↑r) * ↑r ^ n / ↑n.factorial

theorem ProbabilityTheory.poissonMeasure_real_singleton_pos E1 #

∀ {r : NNReal} (n : ℕ), 0 < r → 0 < (ProbabilityTheory.poissonMeasure r).real {n}

theorem ProbabilityTheory.hasSum_one_poissonMeasure E1 #

∀ (r : NNReal), HasSum (fun n ↦ Real.exp (-↑r) * ↑r ^ n / ↑n.factorial) 1

instance ProbabilityTheory.instIsProbabilityMeasureNatPoissonMeasure E0 #

∀ (r : NNReal), MeasureTheory.IsProbabilityMeasure (ProbabilityTheory.poissonMeasure r)

theorem ProbabilityTheory.integrable_poissonMeasure_iff E0 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] {r : NNReal} {f : ℕ → E},
  MeasureTheory.Integrable f (ProbabilityTheory.poissonMeasure r) ↔
    Summable fun n ↦ Real.exp (-↑r) * ↑r ^ n / ↑n.factorial * ‖f n‖

theorem ProbabilityTheory.integrable_map_cast_poissonMeasure_iff E0 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] {R : Type u_2} [inst_1 : NatCast R] [inst_2 : MeasurableSpace R]
  {r : NNReal} [Countable R] [MeasurableSingletonClass R] {f : R → E},
  MeasureTheory.Integrable f (MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure r)) ↔
    MeasureTheory.Integrable (f ∘ Nat.cast) (ProbabilityTheory.poissonMeasure r)

theorem ProbabilityTheory.hasSum_integral_poissonMeasure E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {r : NNReal} {f : ℕ → E},
  MeasureTheory.Integrable f (ProbabilityTheory.poissonMeasure r) →
    HasSum (fun n ↦ (Real.exp (-↑r) * ↑r ^ n / ↑n.factorial) • f n) (∫ (n : ℕ), f n ∂ProbabilityTheory.poissonMeasure r)

theorem ProbabilityTheory.integral_poissonMeasure' E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [CompleteSpace E] {r : NNReal} {f : ℕ → E},
  MeasureTheory.Integrable f (ProbabilityTheory.poissonMeasure r) →
    ∫ (n : ℕ), f n ∂ProbabilityTheory.poissonMeasure r = ∑' (n : ℕ), (Real.exp (-↑r) * ↑r ^ n / ↑n.factorial) • f n

If a function is integrable with respect to poissonMeasure r, then its integral against this measure is given by its sum weighted by exp (-r) * r ^ n / n!.

See integral_poissonMeasure for a version where the codomain is finite-dimensional and does not require the integrability hypothesis.

theorem ProbabilityTheory.integral_map_cast_poissonMeasure' E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] {R : Type u_2} [inst_1 : NatCast R] [inst_2 : MeasurableSpace R]
  [inst_3 : NormedSpace ℝ E] [CompleteSpace E] [Countable R] [MeasurableSingletonClass R] {r : NNReal} {f : R → E},
  MeasureTheory.Integrable f (MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure r)) →
    ∫ (x : R), f x ∂MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure r) =
      ∑' (n : ℕ), (Real.exp (-↑r) * ↑r ^ n / ↑n.factorial) • f ↑n

theorem ProbabilityTheory.integral_poissonMeasure E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [FiniteDimensional ℝ E] (r : NNReal)
  (f : ℕ → E),
  ∫ (n : ℕ), f n ∂ProbabilityTheory.poissonMeasure r = ∑' (n : ℕ), (Real.exp (-↑r) * ↑r ^ n / ↑n.factorial) • f n

The integral of a function taking values in a finite-dimensional space against poissonMeasure r is given by its sum weighted by exp (-r) * r ^ n / n!. This version does not require integrability, as the integral exists if and only if the sum exists, and otherwise they are both defined to be zero.

See integral_poissonMeasure' with a general codomain which assumes integrability.

theorem ProbabilityTheory.integral_map_cast_poissonMeasure E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] {R : Type u_2} [inst_1 : NatCast R] [inst_2 : MeasurableSpace R]
  [inst_3 : NormedSpace ℝ E] [FiniteDimensional ℝ E] (r : NNReal) [Countable R] [MeasurableSingletonClass R]
  (f : R → E),
  ∫ (x : R), f x ∂MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure r) =
    ∑' (n : ℕ), (Real.exp (-↑r) * ↑r ^ n / ↑n.factorial) • f ↑n

theorem ProbabilityTheory.charFun_map_cast_poissonMeasure E1 #

∀ (r : NNReal) (t : ℝ),
  MeasureTheory.charFun (MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure r)) t =
    Complex.exp (↑↑r * (Complex.exp (↑t * Complex.I) - 1))

The characteristic function of the Poisson distribution with rate r is t ↦ exp(r(exp(it) - 1)).

theorem ProbabilityTheory.poissonMeasure_conv_poissonMeasure E3 #

∀ (r₁ r₂ : NNReal),
  (ProbabilityTheory.poissonMeasure r₁).conv (ProbabilityTheory.poissonMeasure r₂) =
    ProbabilityTheory.poissonMeasure (r₁ + r₂)

theorem ProbabilityTheory.map_cast_poissonMeasure_conv E0 #

∀ {R : Type u_1} [inst : AddMonoidWithOne R] {mR : MeasurableSpace R} [MeasurableAdd₂ R] (r₁ r₂ : NNReal),
  (MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure r₁)).conv
      (MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure r₂)) =
    MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure (r₁ + r₂))

theorem ProbabilityTheory.IndepFun.hasLaw_add_poissonMeasure E3 #

∀ {Ω : Type u_2} {mΩ : MeasurableSpace Ω} {P : MeasureTheory.Measure Ω} {r₁ r₂ : NNReal} {X Y : Ω → ℕ},
  ProbabilityTheory.IndepFun X Y P →
    ProbabilityTheory.HasLaw X (ProbabilityTheory.poissonMeasure r₁) P →
      ProbabilityTheory.HasLaw Y (ProbabilityTheory.poissonMeasure r₂) P →
        ProbabilityTheory.HasLaw (X + Y) (ProbabilityTheory.poissonMeasure (r₁ + r₂)) P

The sum of two independent Poisson random variables with rates r₁, r₂ is a Poisson random variable with rate r₁ + r₂.

theorem ProbabilityTheory.IndepFun.hasLaw_add_map_cast_poissonMeasure E1 #

∀ {R : Type u_1} [inst : AddMonoidWithOne R] {mR : MeasurableSpace R} {Ω : Type u_2} {mΩ : MeasurableSpace Ω}
  {P : MeasureTheory.Measure Ω} [MeasurableAdd₂ R] {r₁ r₂ : NNReal} {X Y : Ω → R},
  ProbabilityTheory.IndepFun X Y P →
    ProbabilityTheory.HasLaw X (MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure r₁)) P →
      ProbabilityTheory.HasLaw Y (MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure r₂)) P →
        ProbabilityTheory.HasLaw (X + Y)
          (MeasureTheory.Measure.map Nat.cast (ProbabilityTheory.poissonMeasure (r₁ + r₂))) P

The sum of two independent Poisson random variables with rates r₁, r₂ taking values in R is a Poisson random variable with rate r₁ + r₂.