Two-goal lead: is 2–0 the most dangerous lead?
Abstract
Is 2–0 actually the most dangerous lead in football? This study answers it using
3,703 matches drawn from the Soccers football database. Replaying 3,703 matches
with goal timing, the verdict on the "2–0 is the most dangerous lead" folklore
is clear: it isn't — the margin is what matters, not the scoreline shape. All
computation runs in Rust inside a .mars notebook (polars + plotters — charts
as inline SVG), and every table and figure is generated from the extracted CSVs.
Keywords
Keywords: football, analysis, comebacks, mars, sqlite
Table of contents
Introduction
Football folklore says a two-goal lead is the most comfortable — and the most fragile. This notebook tests it properly: for every match with goal timing we replay the scoreline goal-by-goal and record every distinct lead state a team reaches — leading by N with M goals conceded (e.g. 2–0 = lead by 2, conceded 0; 3–1 = lead by 2, conceded 1).
Each (lead, conceded) state is counted once per team-match, at first achievement, then we ask: how did that team finish? If 2–0 leads collapse more often than 3–1 leads, the folklore holds — a clean-sheet two-goal lead is psychologically different from a two-goal lead earned the hard way.
Coverage caveat: goal timing exists only for StatsBomb matches (~4,200 fixtures: World Cups, Euros, Champions League, top domestic leagues back to 1958), so this analyses that subset.
Methods
Data were extracted from the Soccers football database (packages/data) as CSV
snapshots: goal_events.
The analysis runs entirely in Rust inside the notebook: polars handles table
scans, joins and aggregations; plotters renders figures as inline SVG;
mars_table renders result tables.
Each code cell is kept to a single output so results can be read top to bottom.
Results
All figures and tables below are computed directly from the extracted data. Each code cell produces one output — a table, a chart, or a short text summary.
use polars::prelude::*;
let df = LazyCsvReader::new("data/goal_events.csv")
.finish()
.expect("failed to open data/goal_events.csv — run from the notebook directory")
.collect()
.expect("failed to collect CSV into DataFrame");
println!(
"loaded {} goal rows | schema: {:?}",
df.height(),
df.get_column_names()
);
loaded 11328 goal rows | schema: ["mid", "date", "league", "season", "hid", "aid", "home", "away", "hg", "ag", "minute", "added_minute", "gtid", "gteam", "gtype"]
let s = |name: &str| df.column(name).unwrap_or_else(|_| panic!("missing {name}")).clone();
let col_str = |name: &str| -> Vec<String> {
s(name).str().unwrap().iter().map(|o| o.unwrap_or("").to_string()).collect()
};
let col_i64 = |name: &str| -> Vec<i64> {
let c = s(name);
let c = if c.dtype() == &DataType::Null { c.cast(&DataType::Int64).unwrap() } else { c };
c.i64().unwrap().iter().map(|o| o.unwrap_or(0)).collect()
};
let mid_v = col_i64("mid");
let league_v = col_str("league");
let hid_v = col_i64("hid");
let aid_v = col_i64("aid");
let home_v = col_str("home");
let away_v = col_str("away");
let hg_v = col_i64("hg");
let ag_v = col_i64("ag");
let minute_v = col_i64("minute");
let added_v = col_i64("added_minute");
let gtid_v = col_i64("gtid");
let gteam_v = col_str("gteam");
let ng = df.height();
println!("extracted {ng} goal rows");
// index goals by match, sorted by (minute, added)
use std::collections::BTreeMap;
let mut order: Vec<usize> = (0..ng).collect();
order.sort_by_key(|&i| (mid_v[i], minute_v[i], added_v[i]));
// per-match goal lists
let mut match_goals: BTreeMap<i64, Vec<usize>> = BTreeMap::new();
for &i in &order {
match_goals.entry(mid_v[i]).or_default().push(i);
}
// team display names
let mut names: std::collections::HashMap<i64, String> = std::collections::HashMap::new();
for i in 0..ng {
names.entry(hid_v[i]).or_insert_with(|| home_v[i].clone());
names.entry(aid_v[i]).or_insert_with(|| away_v[i].clone());
}
println!("matches with goal data: {}", match_goals.len());
extracted 11328 goal rows
matches with goal data: 3703
Replay every match goal-by-goal
For each team we record the set of (lead_by, conceded) states first achieved while ahead, then credit the final result to each state.
use std::collections::HashMap;
// key: (lead_by capped at 3, conceded capped at 3) -> [count, pts]
let mut stats: HashMap<(i64, i64), (u64, f64)> = HashMap::new();
let mut examples_20: Vec<String> = Vec::new();
for (_mid, idxs) in match_goals.iter() {
let i0 = idxs[0];
let (hid, aid, hg, ag) = (hid_v[i0], aid_v[i0], hg_v[i0], ag_v[i0]);
let mut hs = 0i64;
let mut as_ = 0i64;
let mut home_states: std::collections::HashSet<(i64, i64)> = std::collections::HashSet::new();
let mut away_states: std::collections::HashSet<(i64, i64)> = std::collections::HashSet::new();
for &gi in idxs {
let is_home = gtid_v[gi] == hid;
if is_home { hs += 1; } else { as_ += 1; }
let (my, opp) = if is_home { (hs, as_) } else { (as_, hs) };
let lead = my - opp;
if lead >= 1 {
let key = (lead.min(3), opp.min(3));
if is_home { home_states.insert(key); } else { away_states.insert(key); }
}
}
// credit outcomes: home win = 3/1/0 pts for home states, mirrored for away
let (hpts, apts) = if hg > ag { (3.0, 0.0) } else if hg == ag { (1.0, 1.0) } else { (0.0, 3.0) };
for key in home_states {
let e = stats.entry(key).or_insert((0, 0.0));
e.0 += 1; e.1 += hpts;
if key == (2, 0) && hpts < 3.0 && examples_20.len() < 8 {
examples_20.push(format!("{} {}–{} {} ({})", home_v[i0], hg, ag, away_v[i0], league_v[i0]));
}
}
for key in away_states {
let e = stats.entry(key).or_insert((0, 0.0));
e.0 += 1; e.1 += apts;
if key == (2, 0) && apts < 3.0 && examples_20.len() < 8 {
examples_20.push(format!("{} {}–{} {} ({})", away_v[i0], ag, hg, home_v[i0], league_v[i0]));
}
}
}
// ordered table: lead_by 1..3+, conceded 0..3+
let mut keys: Vec<(i64, i64)> = stats.keys().cloned().collect();
keys.sort();
let mut rows: Vec<Vec<String>> = Vec::new();
for (lb, c) in &keys {
let (cnt, pts) = stats[&(*lb, *c)];
let nf = cnt as f64;
let win_pct = pts / nf / 3.0 * 100.0; // pts per game / 3 = win-equivalent %
let label = if *lb >= 3 { format!("{}+", lb) } else { lb.to_string() };
let clabel = if *c >= 3 { "3+".to_string() } else { c.to_string() };
rows.push(vec![
format!("{}–{}", label, clabel),
cnt.to_string(),
format!("{:.1}%", win_pct),
format!("{:.2}", pts / nf),
]);
}
mars_table(&["lead (for–against)", "times held", "win%*", "pts/game"], &rows);
println!("*win% = points earned ÷ 3 — a team that always won would be 100%");
// head-to-head: 2-0 vs 3-1 (same 2-goal margin, different conceded)
for key in [(2i64, 0i64), (2, 1), (1, 0), (1, 1), (3, 0), (3, 1)] {
if let Some((cnt, pts)) = stats.get(&key) {
println!("lead {}-{}: n={} pts/game={:.3}", key.0, key.1, cnt, pts / *cnt as f64);
}
}
println!("--- examples of 2-0 leads that did NOT win ---");
for e in &examples_20 { println!(" {e}"); }
*win% = points earned ÷ 3 — a team that always won would be 100%
lead 2-0: n=1718 pts/game=2.853
lead 2-1: n=417 pts/game=2.854
lead 1-0: n=3703 pts/game=2.309
lead 1-1: n=872 pts/game=2.486
lead 3-0: n=765 pts/game=2.987
lead 3-1: n=202 pts/game=2.980
--- examples of 2-0 leads that did NOT win ---
Everton 3–3 Bournemouth (English Premier League)
Liverpool 2–2 Sunderland (English Premier League)
Liverpool 2–3 Southampton (English Premier League)
Napoli 2–2 Sampdoria (Italian Serie A)
Empoli 2–2 Fiorentina (Italian Serie A)
Roma 3–3 Chievo (Italian Serie A)
Frosinone 2–2 Sassuolo (Italian Serie A)
Bologna 2–2 Lazio (Italian Serie A)
| lead (for–against) | times held | win%* | pts/game |
|---|---|---|---|
| 1–0 | 3703 | 77.0% | 2.31 |
| 1–1 | 872 | 82.9% | 2.49 |
| 1–2 | 172 | 78.9% | 2.37 |
| 1–3+ | 41 | 52.8% | 1.59 |
| 2–0 | 1718 | 95.1% | 2.85 |
| 2–1 | 417 | 95.1% | 2.85 |
| 2–2 | 74 | 84.7% | 2.54 |
| 2–3+ | 14 | 47.6% | 1.43 |
| 3+–0 | 765 | 99.6% | 2.99 |
| 3+–1 | 202 | 99.3% | 2.98 |
| 3+–2 | 23 | 97.1% | 2.91 |
| 3+–3+ | 2 | 100.0% | 3.00 |
use plotters::prelude::*;
// collapse rate = 1 - win-equivalent, for each lead row, ordered as in table
let mut labels2: Vec<String> = Vec::new();
let mut fail: Vec<f64> = Vec::new();
for (lb, c) in &keys {
let (cnt, pts) = stats[&(*lb, *c)];
labels2.push(if *lb >= 3 { format!("{}+-{}", lb, c) } else { format!("{}-{}", lb, c) });
fail.push(100.0 - pts / cnt as f64 / 3.0 * 100.0);
}
let ymax2 = fail.iter().cloned().fold(1.0_f64, f64::max) * 1.2;
let n2 = fail.len();
let figure = plotters::evcxr::evcxr_figure((720, 400), |root| {
root.fill(&WHITE)?;
let mut chart = ChartBuilder::on(&root)
.caption("Fail-to-win rate by lead state (pts/game ÷ 3 inverted)", ("sans-serif", 18))
.margin(10)
.x_label_area_size(60)
.y_label_area_size(45)
.build_cartesian_2d(-0.5_f64..(n2 as f64 - 0.5), 0.0_f64..ymax2)?;
chart.configure_mesh().x_labels(n2).x_label_formatter(&|x: &f64| {
labels2.get(*x as usize).cloned().unwrap_or_default()
}).draw()?;
chart.draw_series((0..n2).map(|i| {
let color = if labels2[i].starts_with("2-0") { RED } else { BLUE };
Rectangle::new([(i as f64 - 0.35, 0.0), (i as f64 + 0.35, fail[i])], color.filled())
}))?;
Ok(())
});
figure.evcxr_display();
loaded 11328 goal rows | schema: ["mid", "date", "league", "season", "hid", "aid", "home", "away", "hg", "ag", "minute", "added_minute", "gtid", "gteam", "gtype"]
extracted 11328 goal rows
matches with goal data: 3703
*win% = points earned ÷ 3 — a team that always won would be 100%
lead 2-0: n=1718 pts/game=2.853
lead 2-1: n=417 pts/game=2.854
lead 1-0: n=3703 pts/game=2.309
lead 1-1: n=872 pts/game=2.486
lead 3-0: n=765 pts/game=2.987
lead 3-1: n=202 pts/game=2.980
--- examples of 2-0 leads that did NOT win ---
Everton 3–3 Bournemouth (English Premier League)
Liverpool 2–2 Sunderland (English Premier League)
Liverpool 2–3 Southampton (English Premier League)
Napoli 2–2 Sampdoria (Italian Serie A)
Empoli 2–2 Fiorentina (Italian Serie A)
Roma 3–3 Chievo (Italian Serie A)
Frosinone 2–2 Sassuolo (Italian Serie A)
Bologna 2–2 Lazio (Italian Serie A)
Discussion
Replaying 3,703 matches with goal timing, the verdict on the "2–0 is the most dangerous lead" folklore is clear: it isn't — the margin is what matters, not the scoreline shape.
| Lead state | Times held | Win-equiv.% |
|---|---|---|
| 1–0 | 3,703 | 77.0% |
| 2–0 | 1,718 | 95.1% |
| 2–1 | 417 | 95.1% |
| 3–1 | 202 | 99.3% |
| 3–0 | 765 | 99.6% |
A 2–0 lead and a 3–1 lead — identical two-goal margins — convert at the same 95.1% rate. The clean sheet is psychologically comforting but statistically irrelevant. What actually predicts safety is the margin: one-goal leads win ~77%, two-goal leads ~95%, three-goal leads ~99%+. The true "danger zone" is the single-goal lead, where nearly 1 in 4 teams fails to win.
And yes, 2–0 leads do collapse — Everton's 3–3 with Bournemouth, Liverpool's 2–3 loss to Southampton — but they collapse at exactly the rate the maths predicts. Comfort is earned, not gifted.
Limitations. The analysis is limited to the competitions present in the database; player-level metrics exist only for StatsBomb-covered tournaments, and underlying event data may contain errors.
Conclusion
Replaying 3,703 matches with goal timing, the verdict on the "2–0 is the most dangerous lead" folklore is clear: it isn't — the margin is what matters, not the scoreline shape. Together these results answer the research question posed in the Introduction and quantify the pattern across 3,703 matches. The notebook provides a fully reproducible pipeline from raw CSV extracts to published figures.