The flashlight transformation of a copula #
This file formalizes the following theorem and its proof:
Theorem. Let C_α be a d-copula, I := {1, …, d}, S ⊆ I,
P_U(⋂_{i ∈ I} {U_i ≤ u_i}) := C_α(u) a measure, and
C^F_{α,S}(u) := P_U((⋂_{i ∈ S} {U_i > 1 - u_i}) ∩ (⋂_{i ∈ S̄} {U_i ≤ u_i})).
Then C^F_{α,S} is a d-copula and can be expressed as
C^F_{α,S}(u) = ∑_{A ⊆ S} (-1)^|A| C_α(κ_{S,A}(1, u), …, κ_{S,A}(d, u)),
where S̄ = I \ S and κ_{S,A}(i, u) is 1 - u_i if i ∈ A, 1 if i ∈ S \ A and u_i if
i ∈ S̄.
Formalization notes #
- The index set
I = {1, …, d}is modelled by an arbitrary finite typeι, andP_Uby a probability measureμonι → ℝwhose distribution function agrees withC_αon[0,1]^ι. - A corner
z ∈ ×_{i=1}^d {u_i, v_i}of a boxB = ×_{i=1}^d [u_i, v_i]is indexed by the setsof coordinates withz_k = v_k, i.e.z = s.piecewise v u. ThenN_I(z, u, v) = |sᶜ|, the number of coordinates at the lower bound. - The sieve formula for measures [Comtet1974] is not available in Mathlib and is proved below.
- The step
P_U((⋂_{i ∈ A} {U_i ≤ 1 - u_i}) ∩ (⋂_{i ∈ S̄} {U_i ≤ u_i})) = C_α(κ_{S,A}(1, u), …)implicitly replaces the events{U_i ≤ 1}fori ∈ S \ Aby the whole space. This is justified here explicitly: sinceC_α(1, …, 1) = 1, the event⋂_{i ∈ I} {U_i ≤ 1}has probability one, so intersecting with it does not change any probability.
References #
- Text S1 (proof of the theorem): https://doi.org/10.1371/journal.pcbi.1000577.s001
- The paper: https://doi.org/10.1371/journal.pcbi.1000577
- [Comtet1974] L. Comtet, Advanced Combinatorics, D. Reidel Publishing Company, 1974.
The lemma #
Lemma. Let (Ω, 𝓕, P) be a probability space with A ∈ 𝓕. Then P^A := P(• ∩ A) is a
measure on 𝓕.
Equations
- Flashlight.restrictMeasure P A hA = MeasureTheory.Measure.ofMeasurable (fun (E : Set Ω) (x : MeasurableSet E) => P (E ∩ A)) ⋯ ⋯
Instances For
The sieve formula for finite measures [Comtet1974] #
Inclusion–exclusion, complement form.
Sieve formula (inclusion–exclusion principle) for finite measures:
ν(⋃_{i ∈ S} E_i) = ∑_{k=1}^{|S|} (-1)^{k-1} ∑_{A ⊆ S, |A| = k} ν(⋂_{i ∈ A} E_i).
Copulas #
V_C(B) = ∑_{z ∈ ×_{i=1}^d {u_i, v_i}} (-1)^{N_I(z, u, v)} C(z) for the box
B = ×_{i=1}^d [u_i, v_i], where the corner z = s.piecewise v u takes the value v_k for
k ∈ s and u_k otherwise, so that N_I(z, u, v) = |sᶜ|.
Instances For
C is a d-copula (only its values on [0,1]^ι matter).
Cis grounded.Chas uniform margins.Cisd-increasing.
Instances For
The objects of the theorem #
The right-hand side of the flashlight formula,
∑_{A ⊆ S} (-1)^|A| C_α(κ_{S,A}(1, u), …, κ_{S,A}(d, u)).
Equations
- Flashlight.flashlightSum C S u = ∑ A ∈ S.powerset, (-1) ^ A.card * C (Flashlight.kappa S A u)
Instances For
C^F_{α,S}(u) := P_U((⋂_{i ∈ S} {U_i > 1 - u_i}) ∩ (⋂_{i ∈ S̄} {U_i ≤ u_i})).
Equations
Instances For
Elementary lemmas #
The flashlight formula #
The event ⋂_{i ∈ I} {U_i ≤ 1} has probability one, because P_U(⋂_{i ∈ I} {U_i ≤ 1}) = C_α(1, …, 1) = 1. This justifies replacing the events {U_i ≤ 1} by the whole space.
P_U((⋂_{i ∈ A} {U_i ≤ 1 - u_i}) ∩ (⋂_{i ∈ S̄} {U_i ≤ u_i})) = C_α(κ_{S,A}(1, u), …, κ_{S,A}(d, u)). The event on the left-hand side does not contain the
conditions U_i ≤ κ_{S,A}(i, u) = 1 for i ∈ S \ A, but these hold almost surely by
measure_compl_le_one_eq_zero.
The flashlight formula C^F_{α,S}(u) = ∑_{A ⊆ S} (-1)^|A| C_α(κ_{S,A}(1, u), …).
C^F_{α,S} is a copula #
χ_A(i) is 1 if i ∈ A and 0 if i ∉ A.
Instances For
ψ_S(z_k) := χ_S(k)(1 - z_k) + χ_{S̄}(k)(z_k).
Equations
- Flashlight.psi S z k = Flashlight.chi S k * (1 - z k) + Flashlight.chi Sᶜ k * z k
Instances For
A corner z with z_{s_A} = v_{s_A} and the corner with z_{s_A} = u_{s_A} have opposite
signs: (-1)^{N_I(z, u, v) - 1} and (-1)^{N_I(z, u, v)}.
Theorem. C^F_{α,S} (here in the form of the right-hand side of the flashlight formula)
is a d-copula.
Theorem. Let C_α be a d-copula, S ⊆ I and P_U a probability measure with
P_U(⋂_{i ∈ I} {U_i ≤ u_i}) = C_α(u) for u ∈ [0,1]^d. Then C^F_{α,S} is a d-copula and
C^F_{α,S}(u) = ∑_{A ⊆ S} (-1)^|A| C_α(κ_{S,A}(1, u), …, κ_{S,A}(d, u)) for u ∈ [0,1]^d.