Mean as the integral of the survival function (integration by parts)
Provedsurvival_mean_ibpSurvival-function mean identity (improper integration by parts). Let be the CDF of a nonnegative random variable with density , i.e. for all . Then the mean equals the integral of the survival function:
provided and are integrable on and the boundary term as . This is the standard tail-integral / layer-cake identity for the expectation of a nonnegative random variable, proved by improper integration by parts with , .
Preamble
import Mathlib.MeasureTheory.Integral.IntegralEqImproper import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.Analysis.Calculus.Deriv.Mul open MeasureTheory Set Filter Topology
Formal statement
theorem survival_mean_ibp (F f : ℝ → ℝ) (hF : ∀ x, HasDerivAt F (f x) x) (hint_tf : IntegrableOn (fun t => t * f t) (Ioi (0:ℝ))) (hint_surv : IntegrableOn (fun t => 1 - F t) (Ioi (0:ℝ))) (hdecay : Tendsto (fun t => t * (1 - F t)) atTop (𝓝 0)) : ∫ t in Ioi (0:ℝ), t * f t = ∫ t in Ioi (0:ℝ), (1 - F t) := by sorry
Source
Standard layer-cake / tail-integral identity for the expectation of a nonnegative random variable (E[T] = ∫₀^∞ P(T>t) dt). Used in A. Siegel, 'Median Bounds and their Application', J. Algorithms 38:184-236 (2001), Lemma 2.1 / Theorem 2.2, to identify the mean of the waiting-time density with ∫(1-F). Proof = improper integration by parts (MeasureTheory.integral_Ioi_mul_deriv_eq_deriv_mul).