Freezing an independent variable #
If X and Y are independent, the expectation of g(X, Y) can be computed by freezing X at
a value x, averaging g(x, Y) over Y alone, and then averaging the result over the law of
X:
𝔼[g(X, Y)] = ∫ x, 𝔼[g(x, Y)] d(law X).
This is the freezing lemma. When X = N is a count it is the law of total expectation over the
number of jumps, the step every Poisson-mixture computation takes: the Merton jump-diffusion price
(BlackScholes/MertonModel.lean) and the compound-Poisson moment generating function
(Actuarial/CompoundPoissonMGF.lean) both go through it. With X a jump part of any law it is
the mixing formula of BlackScholes/JumpDiffusionMixing.lean: a jump-diffusion call is the
Black–Scholes price averaged over the jumps.
The proof composes two Mathlib facts: independence makes the joint law the product of the
marginal laws (IndepFun.map_prod_eq_prod_map_map), and an integral against a product measure
is an iterated integral (integral_prod).
Its conditional form is Shreve's independence lemma (Stochastic Calculus for Finance II,
Lemma 2.3.4): if X is measurable for a σ-algebra 𝓜 and Y is independent of 𝓜, then
𝔼[g(X, Y) | 𝓜] = G(X), with G(x) = 𝔼[g(x, Y)].
Given 𝓜, X is known and Y keeps its law. On an event s ∈ 𝓜 the joint law of (X, Y)
is the law of X on s times the law of Y (map_restrict_prodMk_of_indep), so the
unconditional computation runs on every such event, which characterizes the conditional
expectation. This is the step that prices an option at an intermediate date: the state at t is
known, and the increment to maturity is independent of the past (the American put's Brownian
transitions, BlackScholes/AmericanPut/Stopping/BrownianTransition.lean, and the jump-diffusion
prices of BlackScholes/JumpDiffusionOptionPrices.lean).
Main results #
integrable_comp_prodMk_iff_of_indepFun:g(X, Y)is integrable exactly whengis integrable against the product of the laws.integral_comp_prodMk_of_indepFun: the freezing lemma.integrable_prod_map_of_countable: for a countable-valuedX, integrability against the product of the laws is checked one value ofXat a time.integral_comp_prodMk_of_indepFun_of_countable: the freezing lemma for a countable-valuedXand a nonnegativeg, with integrability checked one value ofXat a time.integral_comp_of_hasLaw_of_countable: integrating out a countable variable. ForXwith a countable lawν, independent ofY, and a nonnegativeFwhose expectationsc a = 𝔼[F(a, Y)]are finite and integrable againstν,𝔼[F(X, Y)] = ∫ a, c a ∂ν. Withν = Poisson(Λ)this is the Poisson-mixture step.condExp_comp_prodMk_of_indep: the conditional freezing lemma (Shreve's independence lemma),𝔼[g(X, Y) | 𝓜] = G(X)forXmeasurable for𝓜andYindependent of𝓜.indepFun_prodMk_of_indepFun_prodMk: ifXis independent of(Y, W)andYofW, thenYis independent of(X, W). Mutual independence of three variables can be stated with any of them split off first.
For independent X and Y, g(X, Y) is integrable exactly when g is integrable against
the product of the laws of X and Y.
The freezing lemma. For independent X and Y, and g integrable against the product
of their laws, 𝔼[g(X, Y)] = ∫ x, 𝔼[g(x, Y)] d(law X).
For a countable-valued X, integrability of g against the product of the laws is checked
one value of X at a time: each g(a, Y) integrable, and a ↦ 𝔼‖g(a, Y)‖ integrable against
the law of X. Measurability of the sections suffices, since X takes countably many values.
The freezing lemma for a countable variable. For a countable-valued X independent of Y
and a nonnegative g, if each g(a, Y) is integrable and a ↦ 𝔼[g(a, Y)] is integrable against
the law of X, then 𝔼[g(X, Y)] = ∫ a, 𝔼[g(a, Y)] d(law X).
Integrating out a countable variable. For X with a countable law ν, independent of
Y, and a nonnegative F, if each F(a, Y) is integrable with expectation c a and c is
integrable against ν, then 𝔼[F(X, Y)] = ∫ a, c a ∂ν. For a Poisson count this is the
Poisson-mixture step of a compound-Poisson computation.
The conditional freezing lemma #
On an event s of a σ-algebra m for which X is measurable and of which Y is independent,
the joint law of (X, Y) under P restricted to s is the law of X on s times the law of Y
under P. Normalized by P(s), it says that given s, Y keeps its law and stays independent of
X.
The conditional freezing lemma (Shreve's independence lemma). If X is measurable for a
σ-algebra m and Y is independent of m, then 𝔼[g(X, Y) | m] = G(X) almost surely, with
G(x) = ∫ g(x, y) d(law Y)(y), for g strongly measurable and g(X, Y) integrable: given m,
X is known and Y keeps its law. On each event of m the joint law of (X, Y) is a product
(map_restrict_prodMk_of_indep), so both sides have the same integral over it.
Re-associating independence #
Moving the middle factor of a triple product measure to the front:
(μ ⊗ (ν ⊗ ρ)).map ((a, b, c) ↦ (b, a, c)) = ν ⊗ (μ ⊗ ρ).
Re-associating independence. If X is independent of (Y, W) and Y of W, then Y
is independent of (X, W). Either pair of hypotheses says that X, Y and W are mutually
independent: the joint law is the product of the three marginal laws.