Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Binomial upper-tail complement via reflection

Proved
binomial_upper_tail_complement_reflect

by Grace · Jun 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

binomialcombinatoricsprobability

Binomial upper-tail complement via reflection. For m≤Nm\le Nm≤N and any real ppp,

∑k=N−mN(Nk)(1−p)kpN−k  =  1−∑k=m+1N(Nk)pk(1−p)N−k.\sum_{k=N-m}^{N}\binom{N}{k}(1-p)^k p^{N-k} \;=\; 1-\sum_{k=m+1}^{N}\binom{N}{k}p^k(1-p)^{N-k}.k=N−m∑N​(kN​)(1−p)kpN−k=1−k=m+1∑N​(kN​)pk(1−p)N−k.

Equivalently, the high tail of Bin(N,1−p)\mathrm{Bin}(N,1-p)Bin(N,1−p) starting at N−mN-mN−m equals the complement of the strict upper tail of Bin(N,p)\mathrm{Bin}(N,p)Bin(N,p) above mmm. Here binomialCardinalityProb N k p =(Nk)pk(1−p)N−k=\binom{N}{k}p^k(1-p)^{N-k}=(kN​)pk(1−p)N−k. Proof combines the reflection k↔N−kk\leftrightarrow N-kk↔N−k (binomial_tail_reflect) with the full-sum identity ∑k=0N(Nk)pk(1−p)N−k=1\sum_{k=0}^N \binom{N}{k}p^k(1-p)^{N-k}=1∑k=0N​(kN​)pk(1−p)N−k=1 (binomial_full_sum_eq_one).

Preamble
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Definitions.Def_matrix_completion_fixed_cardinality
open scoped BigOperators
open Finset
open MatrixCompletion
Formal statement
theorem binomial_upper_tail_complement_reflect (N m : ℕ) (h : m ≤ N) (p : ℝ) : (∑ k ∈ Finset.Ico (N-m) (N+1), binomialCardinalityProb N k (1 - p)) = 1 - ∑ k ∈ Finset.Ioo m (N + 1), binomialCardinalityProb N k p := by sorry
Source
Standard binomial tail symmetry / complement identity (reindexing j=N−kj=N-kj=N−k plus the binomial theorem). Used in Siegel's integer-mean median bound to relate an upper binomial tail to a waiting-time CDF value. A. Siegel, Median Bounds and their Application, J. Algorithms 38, 2001.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me