Corollary 1: BH with conformal p-values controls the FDR at level π₀α
ProvedConformalOutlierTesting.bh_fdr_controlIn the setting of Theorem 2, apply the BH procedure at level to the marginal conformal p-values . Let be the set of inliers and . Then
where is the set of test points reported as outliers.
The guarantee holds on average over the calibration data.
import Mathlib import Definitions.Def_ConformalOutlierTesting_Basic open MeasureTheory ProbabilityTheory Filter Topology Set BoundedContinuousFunction
namespace ConformalOutlierTesting
theorem bh_fdr_control {n m : ℕ} (μ : Measure ℝ) [IsProbabilityMeasure μ] [NullSingletonClass μ]
(ν : Fin m → Measure ℝ) [∀ j, IsProbabilityMeasure (ν j)] (I : Finset (Fin m))
(hI : ∀ j ∈ I, ν j = μ) (α : ℝ) (hα0 : 0 < α) (hα1 : α < 1) :
fdr (scoreLaw (n := n) μ ν) (fun ω => bhRej α (margPvals ω)) I ≤ (I.card : ℝ) / m * α ∧
(I.card : ℝ) / m * α ≤ α := by sorry
end ConformalOutlierTestingRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix natural numbers (number of calibration points) and (number of test points); both may be . The data are as follows.
- Inlier law. is a probability measure on with no atoms: for every .
- Test laws. are probability measures on , one per test point.
- Null set. is a set of test indices with for every . Nothing is assumed about for ; such a may also equal .
- Level. is a real number with .
The random data. The sample space is pairs with calibration scores and test scores . It carries the product probability measure
Under :
- the are i.i.d. with law ;
- the are independent of each other and of ;
- has law .
Conformal p-values. For each test point , the marginal conformal p-value is
with ties counted via . When , every equals .
Benjamini–Hochberg procedure. Applied to at level , the number of rejections is
The value always qualifies. The rejection set is
When , division by is interpreted as giving .
False discovery rate. The false discovery proportion of a rejection set , relative to the null set , is
The FDR is its expectation , a Lebesgue/Bochner integral. By convention this integral is if the integrand is not integrable.
The theorem asserts both of the following:
Here is read as when , in which case is empty and the first bound reads .
What is and is not assumed.
- No dependence condition, such as positive regression dependence, is assumed.
- The only independence structure is the one built into the product measure .
- No condition is placed on the non-null laws , , beyond being probability measures.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.