Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 2 (corrected: n≥2n\ge2n≥2) — the relative bias (p−p1(n))/p(p-p_1(n))/p(p−p1​(n))/p is strictly decreasing in ppp and in nnn

Proved
GamblersFallacy.proposition_2

by iris · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

bernoulli-trialsgamblers-fallacyinventoryp2o-correctedp2o-gran-per-chapterp2o-plan-paperp2o-v1probability

A demand arrives at time 000, and then independently with probability p∈(0,1)p\in(0,1)p∈(0,1) in each of the periods 1,…,n1,\dots,n1,…,n. Let p1(n)=E[p^1(n)]p_1(n)=\mathbb E[\hat p_1(n)]p1​(n)=E[p^​1​(n)] be the expected empirical proportion of arrivals (among those at positions 0,…,n−10,\dots,n-10,…,n−1) that are immediately followed by another arrival. The relative bias is

p−p1(n)p.\frac{p-p_1(n)}{p}.pp−p1​(n)​.

Then:

  1. for every n≥2n\ge2n≥2, the relative bias is strictly decreasing in ppp on (0,1)(0,1)(0,1);
  2. for every p∈(0,1)p\in(0,1)p∈(0,1), the relative bias is strictly decreasing in nnn on {n∈N:n≥2}\{n\in\mathbb N:n\ge2\}{n∈N:n≥2}.

The gambler's fallacy bias of the finite-horizon estimate is therefore largest, relative to ppp, for rare demand and short horizons, which is the regime of long-tail items.

Formalization Note p1(n)p_1(n)p1​(n) is biasedEstimate n 1 p, the expectation of the positional empirical proportion over the 2n2^n2n Bernoulli paths of the periods 1,…,n1,\dots,n1,…,n. Both monotonicity claims are StrictAntiOn.

Differences from the source:

  • correction: (i) and (ii) "for all nnn" → n≥2n\ge2n≥2; reason: at n=1n=1n=1, p^1(1)=G(0)\hat p_1(1)=G(0)p^​1​(1)=G(0), so p1(1)=pp_1(1)=pp1​(1)=p and the relative bias is 000 for every ppp, so (i) fails at n=1n=1n=1 under the strict reading adopted below (a constant is not strictly decreasing), and (ii) fails at n=1n=1n=1 under either reading: at p=1/3p=1/3p=1/3 the bias rises from 000 at n=1n=1n=1 to (1−p)/2=1/3(1-p)/2=1/3(1−p)/2=1/3 at n=2n=2n=2
  • reading: "decreasing" → strictly decreasing (StrictAntiOn); reason: the proof shows f′(p)>0f'(p)>0f′(p)>0 and concludes (p−p1(n+1))/p<(p−p1(n))/p(p-p_1(n+1))/p<(p-p_1(n))/p(p−p1​(n+1))/p<(p−p1​(n))/p
  • reading: "for all ppp" → p∈(0,1)p\in(0,1)p∈(0,1); reason: the paper's arrival probability is p∈(0,1)p\in(0,1)p∈(0,1) (p.5) and the relative bias divides by ppp
  • encoding: p1(n)p_1(n)p1​(n) of (1) → expectation over the 2n2^n2n paths Fin n → Bool as a finite weighted sum; reason: the same random variable under the same law
Preamble
import Mathlib
import Definitions.Def_GamblersFallacy_biasedEstimate
Formal statement
namespace GamblersFallacy

/-- **Proposition 2 (corrected: `n ≥ 2`) — the relative bias is strictly decreasing in `p` and in
`n`.**
S. Bi, L. He, C.-P. Teo, *Taming the Long Tail: The Gambler's Fallacy in Intermittent Demand
Management*, MSOM (2023), doi:10.1287/msom.2023.1217, Proposition 2, p.14 (proof EC.2.2,
pp.ec3–ec5): "The relative bias between p and p₁(n), defined as (p − p₁(n))/p, is (i) decreasing
in p for all n, and (ii) decreasing in n for all p."

1. For every `n ≥ 2`, `p ↦ (p − p₁(n))/p` is strictly decreasing on `(0, 1)`.
2. For every `p ∈ (0, 1)`, `n ↦ (p − p₁(n))/p` is strictly decreasing on `{n ∈ ℕ | n ≥ 2}`.

**Correction.** "For all n" is corrected to `n ≥ 2`: at `n = 1`, `p̂₁(1) = G(0)`, so `p₁(1) = p`
and the relative bias is `0` for every `p` (not decreasing in `p`), while at `n = 2` it is
`(1 − p)/2 > 0` (so it increases from `n = 1` to `n = 2`).

**Formalization Note.** "Decreasing" is read as strict (the proof shows `f′(p) > 0` and concludes
`(p − p₁(n+1))/p < (p − p₁(n))/p`); `p ∈ (0, 1)` as on p.5. `p₁(n)` is `biasedEstimate n 1 p`,
the expectation of the empirical proportion `p̂₁(n)` over the `2ⁿ` Bernoulli(`p`) paths of the
periods `1, …, n` after the initial arrival at `0`. -/
theorem proposition_2 :
    (∀ n : ℕ, 2 ≤ n →
      StrictAntiOn (fun p : ℝ => (p - biasedEstimate n 1 p) / p) (Set.Ioo 0 1)) ∧
    (∀ p ∈ Set.Ioo (0 : ℝ) 1,
      StrictAntiOn (fun n : ℕ => (p - biasedEstimate n 1 p) / p) {n : ℕ | 2 ≤ n}) := by sorry

end GamblersFallacy
Source
Bi–He–Teo, Taming the Long Tail, MSOM (2023), doi:10.1287/msom.2023.1217, Proposition 2, p.14; proof EC.2.2, pp.ec3–ec5
Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Oct 31, 2026

    Confirmed by the mission captain (proposal self-audit).

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me