Are unbeaten seasons really that impressive?
Abstract
Are unbeaten seasons really that impressive? This study answers it using
hundreds of thousands of matches drawn from the Soccers football database.
Unbeaten teams don't "play not to lose" — they win more. 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, records, mars, sqlite
Table of contents
Introduction
The romantic claim: an unbeaten league season is the ultimate proof of
dominance. This notebook tests it across every top-flight league in the
dataset — 28 competitions, 592 league-seasons and 9,917 team-seasons, from the
Premier League to the J1 League, all computed from data/matches_full.csv.
The uncomfortable fact up front: the Premier League has exactly one unbeaten season in history — Arsenal 2003/04. Across all covered leagues there are only ~10 unbeaten champions and a handful of unbeaten non-champions. So the real question isn't "unbeaten vs dominant" — it's whether zero defeats is a discontinuity or just the tail of a consistency gradient.
Method. Every team-season is bucketed by its number of defeats (0, 1, 2, 3, 4–6, 7+) and measured on points, ppg, goal difference, win/draw rates and clean sheets — overall and restricted to title contenders (top-4 finishes) to control for the trivial fact that bad teams lose more and score less. Champions are compared separately: unbeaten champions vs ordinary champions vs the biggest points-margin champions. xG is unavailable for most of this history, so everything is actual outcomes — stated throughout as a limitation.
Methods
Data were extracted from the Soccers football database (packages/data) as CSV
snapshots: matches_full.
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::*;
use std::collections::BTreeMap;
let df = LazyCsvReader::new("data/matches_full.csv")
.finish()
.expect("failed to open data/matches_full.csv — run from the notebook directory")
.collect()
.expect("failed to collect CSV into DataFrame");
// top-flight leagues only (country|league pairs)
let top_flight: &[(&str, &str)] = &[
("England", "English Premier League"),
("Spain", "Spanish La Liga"),
("Italy", "Italian Serie A"),
("Germany", "German Bundesliga"),
("France", "French Ligue 1"),
("Netherlands", "Dutch Eredivisie"),
("Portugal", "Portuguese Liga Portugal"),
("Belgium", "Belgian Pro League"),
("Turkey", "Turkish Süper Lig"),
("Scotland", "Scottish Premiership"),
("United States", "MLS"),
("Brazil", "Serie A"),
("Argentina", "Liga Profesional"),
("Mexico", "Liga MX"),
("Japan", "J1 League"),
("Greece", "Greek Super League"),
("Poland", "Ekstraklasa"),
("Sweden", "Allsvenskan"),
("Norway", "Eliteserien"),
("Russia", "Premier League"),
("China", "Super League"),
("Denmark", "Superliga"),
("Switzerland", "Super League"),
("Ireland", "Premier Division"),
("Finland", "Veikkausliiga"),
("Romania", "Superliga"),
("Austria", "Bundesliga"),
];
let is_top = |c: &str, l: &str| top_flight.iter().any(|(tc, tl)| *tc == c && *tl == l);
let df = df
.lazy()
.filter(col("hg").gt_eq(lit(0)))
.filter(col("ag").gt_eq(lit(0)))
.collect()
.expect("filter failed");
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(-1)).collect()
};
let country_v = col_str("country");
let league_v = col_str("league");
let season_v = col_str("season");
let date_v = col_str("date");
let home_v = col_str("home");
let away_v = col_str("away");
let hg_v = col_i64("hg");
let ag_v = col_i64("ag");
fn canon(name: &str) -> &str {
match name {
// England
"Manchester United" | "Man Utd" => "Man United",
"Manchester City" => "Man City",
"Newcastle United" => "Newcastle",
"Tottenham Hotspur" => "Tottenham",
"West Ham United" => "West Ham",
"Leicester City" => "Leicester",
"Norwich City" => "Norwich",
"Stoke City" => "Stoke",
"West Bromwich Albion" => "West Brom",
"Swansea City" => "Swansea",
"Leeds United" => "Leeds",
"Wolverhampton Wanderers" => "Wolves",
"Nott'm Forest" => "Nottingham Forest",
"Birmingham City" => "Birmingham",
"Blackburn Rovers" => "Blackburn",
"Bolton Wanderers" => "Bolton",
"Charlton Athletic" => "Charlton",
// Spain
"Athletic Club" => "Ath Bilbao",
"Atl\u{e9}tico Madrid" => "Ath Madrid",
"Real Betis" => "Betis",
"Celta Vigo" => "Celta",
"Real Sociedad" => "Sociedad",
"Real Valladolid" => "Valladolid",
"Real Zaragoza" => "Zaragoza",
"Rayo Vallecano" => "Vallecano",
"CD Numancia de Soria" => "Numancia",
"Real Murcia CF" => "Murcia",
"Recreativo Huelva" => "Recreativo",
"Sporting Gij\u{f3}n" => "Sp Gijon",
"Espanol" => "Espanyol",
"Gimn\u{e0}stic Tarragona" => "Gimnastic",
"Villarreal" | "Villareel" => "Villarreal",
"Santander" => "Racing Santander",
// Italy
"Inter Milan" => "Inter",
"Verona" => "Hellas Verona",
// Germany
"Bayer Leverkusen" => "Leverkusen",
"Borussia Dortmund" => "Dortmund",
"Eintracht Frankfurt" => "Ein Frankfurt",
"FSV Mainz 05" => "Mainz",
"Hamburger SV" => "Hamburg",
"Hertha Berlin" => "Hertha",
"Leipzig" => "RB Leipzig",
"Borussia M\u{f6}nchengladbach" | "M'gladbach" => "M'Gladbach",
"Darmstadt 98" => "Darmstadt",
"Fortuna Dusseldorf" => "Dusseldorf",
"Hannover 96" => "Hannover",
// France
"Olympique de Marseille" => "Marseille",
"AS Monaco" => "Monaco",
"OGC Nice" => "Nice",
"Stade de Reims" => "Reims",
"Paris Saint-Germain" => "Paris SG",
"Stade Brestois" => "Brest",
"Stade Malherbe Caen" => "Caen",
"Clermont Foot" => "Clermont",
"CA Bastia" => "Bastia",
"Saint-\u{c9}tienne" => "St Etienne",
// Netherlands
"Roda JC" => "Roda",
"Sparta Rotterdam" => "Sparta",
// Portugal
"Desp. Chaves" => "Chaves",
"Campomaior" => "Campomaiorense",
"Madeira" => "Uniao Madeira",
"AVS" => "Academico Viseu",
// Belgium
"Lommel SK" => "Lommel",
"RWD Molenbeek" => "Molenbeek",
"Mouscron" | "Mouscron-Peruwelz" => "RAAL La Louviere",
// Turkiye
"Antalya" => "Antalyaspor",
"Gaziantep" => "Gaziantepspor",
"Kayseri" => "Kayserispor",
"Malatyaspor" => "Yeni Malatyaspor",
other => other,
}
}
#[derive(Clone)]
struct Game {
date: String,
gf: i64,
ga: i64,
}
// league key = "country|league" to disambiguate same-named leagues
let mut team_games: BTreeMap<(String, String, String), Vec<Game>> = BTreeMap::new();
let mut lg_season_matches: BTreeMap<(String, String), usize> = BTreeMap::new();
let mut seen: std::collections::HashSet<(String, String, String, String, String, i64, i64)> = std::collections::HashSet::new();
let mut n_finished = 0usize;
let mut n_dupes = 0usize;
for i in 0..df.height() {
if hg_v[i] < 0 || ag_v[i] < 0 { continue; }
let c = &country_v[i]; let l = &league_v[i];
if !is_top(c, l) { continue; }
let lgkey = format!("{} | {}", c, l);
let sn = season_v[i].clone();
let date = date_v[i][..10].to_string();
let hg = hg_v[i]; let ag = ag_v[i];
let h = canon(&home_v[i]).to_string();
let a = canon(&away_v[i]).to_string();
if !seen.insert((lgkey.clone(), sn.clone(), h.clone(), a.clone(), date.clone(), hg, ag)) {
n_dupes += 1;
continue;
}
n_finished += 1;
*lg_season_matches.entry((lgkey.clone(), sn.clone())).or_insert(0) += 1;
team_games.entry((lgkey.clone(), sn.clone(), h.clone())).or_default()
.push(Game { date: date.clone(), gf: hg, ga: ag });
team_games.entry((lgkey.clone(), sn.clone(), a)).or_default()
.push(Game { date, gf: ag, ga: hg });
}
for games in team_games.values_mut() {
games.sort_by(|x, y| x.date.cmp(&y.date));
}
println!("top-flight finished matches: {} ({} dupes dropped)", n_finished, n_dupes);
println!("league-seasons: {} | team-season entries: {}", lg_season_matches.len(), team_games.len());
fn pts(g: &Game) -> i64 {
if g.gf > g.ga { 3 } else if g.gf == g.ga { 1 } else { 0 }
}
#[derive(Clone)]
struct Rec {
team: String,
played: usize,
w: i64, d: i64, l: i64,
pts: i64, gf: i64, ga: i64, gd: i64,
}
// standings for one league-season
let standings = |lg: &str, sn: &str| -> Vec<Rec> {
let mut teams: Vec<String> = Vec::new();
for ((l, s, t), _) in &team_games {
if l == lg && s == sn && !teams.contains(t) { teams.push(t.clone()); }
}
let mut recs: Vec<Rec> = Vec::new();
for t in teams {
if let Some(games) = team_games.get(&(lg.to_string(), sn.to_string(), t.clone())) {
let mut r = Rec { team: t, played: games.len(), w: 0, d: 0, l: 0, pts: 0, gf: 0, ga: 0, gd: 0 };
for g in games {
r.gf += g.gf; r.ga += g.ga;
if g.gf > g.ga { r.w += 1; r.pts += 3; }
else if g.gf == g.ga { r.d += 1; r.pts += 1; }
else { r.l += 1; }
}
r.gd = r.gf - r.ga;
recs.push(r);
}
}
recs.sort_by(|a, b| b.pts.cmp(&a.pts).then(b.gd.cmp(&a.gd)).then(b.gf.cmp(&a.gf)).then(a.team.cmp(&b.team)));
recs
};
// complete league-seasons only: >= 120 total matches (drops in-progress)
let mut complete_ls: Vec<(String, String)> = lg_season_matches.iter()
.filter(|(_, c)| **c >= 120)
.map(|(k, _)| k.clone()).collect();
complete_ls.sort();
println!("complete league-seasons: {}", complete_ls.len());
top-flight finished matches: 176903 (1188 dupes dropped)
league-seasons: 610 | team-season entries: 10492
complete league-seasons: 592
The unbeaten roll call
Every team-season in the dataset with zero defeats (minimum 25 matches played, complete league-seasons only). Each is checked against the league table: champion or merely unbeaten?
struct UB {
league: String, season: String, team: String,
played: i64, draws: i64, gf: i64, ga: i64, pos: i64, champ: bool,
}
let mut unbeaten: Vec<UB> = Vec::new();
for ((lg, sn, tm), games) in &team_games {
if games.len() < 25 { continue; }
let mut losses = 0i64; let mut draws = 0i64; let mut gf = 0i64; let mut ga = 0i64;
for g in games {
gf += g.gf; ga += g.ga;
if g.gf < g.ga { losses += 1; }
else if g.gf == g.ga { draws += 1; }
}
if losses != 0 { continue; }
let st = standings(lg, sn);
let pos = st.iter().position(|r| &r.team == tm).map(|i| i as i64 + 1).unwrap_or(0);
unbeaten.push(UB {
league: lg.clone(), season: sn.clone(), team: tm.clone(),
played: games.len() as i64, draws, gf, ga, pos, champ: pos == 1,
});
}
unbeaten.sort_by(|a, b| a.league.cmp(&b.league).then(a.season.cmp(&b.season)));
let ub_rows: Vec<Vec<String>> = unbeaten.iter().map(|u| vec![
u.league.clone(), u.season.clone(), u.team.clone(),
u.played.to_string(), u.draws.to_string(),
format!("{}/{}", u.gf, u.ga),
format!("#{}", u.pos),
if u.champ { "champion".to_string() } else { format!("pos {}", u.pos) },
]).collect();
mars_table(&["league", "season", "team", "played", "draws", "gf/ga", "finish", "status"], &ub_rows);
let ub_champs = unbeaten.iter().filter(|u| u.champ).count();
println!("unbeaten team-seasons: {} | of which champions: {} | non-champions: {}",
unbeaten.len(), ub_champs, unbeaten.len() - ub_champs);
unbeaten team-seasons: 10 | of which champions: 9 | non-champions: 1
| league | season | team | played | draws | gf/ga | finish | status |
|---|---|---|---|---|---|---|---|
| England | English Premier League | 2003/04 | Arsenal | 38 | 12 | 73/26 | #1 | champion |
| Germany | German Bundesliga | 2023/24 | Leverkusen | 34 | 6 | 89/24 | #1 | champion |
| Greece | Greek Super League | 2018/19 | PAOK | 30 | 4 | 66/14 | #1 | champion |
| Italy | Italian Serie A | 2011/12 | Juventus | 38 | 15 | 68/20 | #1 | champion |
| Netherlands | Dutch Eredivisie | 1994/95 | Ajax | 34 | 7 | 106/28 | #1 | champion |
| Portugal | Portuguese Liga Portugal | 2010/11 | Porto | 30 | 3 | 73/16 | #1 | champion |
| Portugal | Portuguese Liga Portugal | 2012/13 | Porto | 30 | 6 | 70/14 | #1 | champion |
| Portugal | Portuguese Liga Portugal | 2025/26 | Benfica | 34 | 11 | 74/25 | #3 | pos 3 |
| Scotland | Scottish Premiership | 2016/17 | Celtic | 38 | 4 | 106/25 | #1 | champion |
| Scotland | Scottish Premiership | 2020/21 | Rangers | 38 | 6 | 92/13 | #1 | champion |
The defeats gradient
If "unbeaten" is genuinely special, the curve of performance vs defeats should show a jump at zero. If it's just the tail of a smooth gradient, consistency is continuous and the romance is marketing.
Two views: all team-seasons, and only title contenders (top-4 finishes) — because the raw correlation is trivially contaminated by bad teams losing more and scoring less.
struct TS {
league: String, season: String, team: String,
played: i64, w: i64, d: i64, l: i64, pts: i64,
gf: i64, ga: i64, cs: i64, pos: i64,
}
let mut all_ts: Vec<TS> = Vec::new();
for ((lg, sn, tm), games) in &team_games {
if games.len() < 25 { continue; }
let st = standings(lg, sn);
let Some(pos) = st.iter().position(|r| &r.team == tm).map(|i| i as i64 + 1) else { continue; };
let mut w = 0i64; let mut d = 0i64; let mut l = 0i64;
let mut gf = 0i64; let mut ga = 0i64; let mut cs = 0i64;
for g in games {
gf += g.gf; ga += g.ga;
if g.ga == 0 { cs += 1; }
if g.gf > g.ga { w += 1; } else if g.gf == g.ga { d += 1; } else { l += 1; }
}
all_ts.push(TS {
league: lg.clone(), season: sn.clone(), team: tm.clone(),
played: games.len() as i64, w, d, l,
pts: 3 * w + d, gf, ga, cs, pos,
});
}
println!("team-seasons analysed: {}", all_ts.len());
fn bucket(l: i64) -> usize {
match l { 0 => 0, 1 => 1, 2 => 2, 3 => 3, 4..=6 => 4, _ => 5 }
}
let bnames = ["0", "1", "2", "3", "4-6", "7+"];
// aggregate helper: mean of f over bucket, optionally restricted to pos<=4
let agg = |f: &dyn Fn(&TS) -> f64, top4_only: bool| -> Vec<f64> {
let mut out = vec![0.0f64; 6];
let mut cnt = vec![0usize; 6];
for t in &all_ts {
if top4_only && t.pos > 4 { continue; }
let b = bucket(t.l);
out[b] += f(t); cnt[b] += 1;
}
for b in 0..6 { if cnt[b] > 0 { out[b] /= cnt[b] as f64; } }
out
};
let ppg_all = agg(&|t| t.pts as f64 / t.played as f64, false);
let gdg_all = agg(&|t| (t.gf - t.ga) as f64 / t.played as f64, false);
let win_all = agg(&|t| t.w as f64 / t.played as f64, false);
let draw_all = agg(&|t| t.d as f64 / t.played as f64, false);
let ppg_t4 = agg(&|t| t.pts as f64 / t.played as f64, true);
let gdg_t4 = agg(&|t| (t.gf - t.ga) as f64 / t.played as f64, true);
let mut rows: Vec<Vec<String>> = Vec::new();
for b in 0..6 {
let n_all = all_ts.iter().filter(|t| bucket(t.l) == b).count();
let n_t4 = all_ts.iter().filter(|t| bucket(t.l) == b && t.pos <= 4).count();
rows.push(vec![
bnames[b].to_string(), n_all.to_string(), n_t4.to_string(),
format!("{:.2}", ppg_all[b]), format!("{:.2}", ppg_t4[b]),
format!("{:+.2}", gdg_all[b]), format!("{:+.2}", gdg_t4[b]),
format!("{:.0}%", 100.0 * win_all[b]), format!("{:.0}%", 100.0 * draw_all[b]),
]);
}
mars_table(&["defeats", "n", "n top-4", "ppg all", "ppg top-4", "gd/g all", "gd/g top-4", "win% all", "draw% all"], &rows);
team-seasons analysed: 9917
| defeats | n | n top-4 | ppg all | ppg top-4 | gd/g all | gd/g top-4 | win% all | draw% all |
|---|---|---|---|---|---|---|---|---|
| 0 | 10 | 10 | 2.58 | 2.58 | +1.79 | +1.79 | 79% | 21% |
| 1 | 38 | 38 | 2.51 | 2.51 | +1.69 | +1.69 | 77% | 20% |
| 2 | 86 | 86 | 2.40 | 2.40 | +1.58 | +1.58 | 73% | 21% |
| 3 | 158 | 157 | 2.28 | 2.29 | +1.36 | +1.37 | 69% | 22% |
| 4-6 | 791 | 748 | 2.05 | 2.07 | +1.01 | +1.04 | 60% | 24% |
| 7+ | 8834 | 1270 | 1.28 | 1.78 | -0.14 | +0.57 | 34% | 26% |
Unbeaten champions vs the most dominant champions
Three groups of title winners across all leagues:
- Unbeaten champions — zero defeats (the romantic archetype)
- Ordinary champions — everyone else who won
- Margin champions — the biggest points-gap winners (≥10 clear)
If invincibility signals superiority, unbeaten champions should beat margin champions on underlying metrics. If it signals risk management, they'll lag on attack and goal difference.
struct Champ {
league: String, season: String, team: String,
played: i64, w: i64, d: i64, l: i64, pts: i64,
gf: i64, ga: i64, pos: i64, margin: i64,
}
let mut champs: Vec<Champ> = Vec::new();
for (lg, sn) in &complete_ls {
let st = standings(lg, sn);
if st.len() < 2 { continue; }
let c = &st[0];
let games = team_games.get(&(lg.clone(), sn.clone(), c.team.clone())).cloned().unwrap_or_default();
if games.len() < 25 { continue; }
let mut w = 0i64; let mut d = 0i64; let mut l = 0i64;
let mut gf = 0i64; let mut ga = 0i64;
for g in &games {
gf += g.gf; ga += g.ga;
if g.gf > g.ga { w += 1; } else if g.gf == g.ga { d += 1; } else { l += 1; }
}
champs.push(Champ {
league: lg.clone(), season: sn.clone(), team: c.team.clone(),
played: games.len() as i64, w, d, l,
pts: c.pts, gf, ga, pos: 1, margin: c.pts - st[1].pts,
});
}
println!("champions analysed: {}", champs.len());
let is_ub = |c: &Champ| c.l == 0;
let is_margin = |c: &Champ| c.margin >= 10 && c.l > 0;
let mean = |v: &[f64]| if v.is_empty() { f64::NAN } else { v.iter().sum::<f64>() / v.len() as f64 };
let stat = |f: &dyn Fn(&Champ) -> f64, pred: &dyn Fn(&Champ) -> bool| -> f64 {
mean(&champs.iter().filter(|c| pred(c)).map(|c| f(c)).collect::<Vec<_>>())
};
let is_other = |c: &Champ| !is_ub(c) && !is_margin(c);
let groups: Vec<(&str, &dyn Fn(&Champ) -> bool)> = vec![
("unbeaten", &is_ub),
("margin >=10pts", &is_margin),
("all other champs", &is_other),
];
let metrics: Vec<(&str, &dyn Fn(&Champ) -> f64)> = vec![
("ppg", &|c| c.pts as f64 / c.played as f64),
("win%", &|c| 100.0 * c.w as f64 / c.played as f64),
("draw%", &|c| 100.0 * c.d as f64 / c.played as f64),
("gf/g", &|c| c.gf as f64 / c.played as f64),
("ga/g", &|c| c.ga as f64 / c.played as f64),
("gd/g", &|c| (c.gf - c.ga) as f64 / c.played as f64),
("margin", &|c| c.margin as f64),
];
let mut rows: Vec<Vec<String>> = Vec::new();
for &(gname, pred) in &groups {
let n = champs.iter().filter(|c| pred(c)).count();
let mut row = vec![gname.to_string(), n.to_string()];
for &(_mname, f) in &metrics {
let v = stat(f, pred);
row.push(if v.is_nan() { "-".to_string() } else { format!("{:.2}", v) });
}
rows.push(row);
}
let mut header = vec!["group".to_string(), "n".to_string()];
for &(mname, _) in &metrics { header.push(mname.to_string()); }
mars_table(&header, &rows);
champions analysed: 576
| group | n | ppg | win% | draw% | gf/g | ga/g | gd/g | margin |
|---|---|---|---|---|---|---|---|---|
| unbeaten | 9 | 2.60 | 80.12 | 19.88 | 2.40 | 0.58 | 1.82 | 14.56 |
| margin >=10pts | 163 | 2.35 | 72.48 | 17.57 | 2.28 | 0.79 | 1.49 | 14.61 |
| all other champs | 404 | 2.17 | 65.57 | 20.34 | 2.05 | 0.87 | 1.18 | 4.11 |
// the unbeaten champions, individually
let ub_rows: Vec<Vec<String>> = champs.iter().filter(|c| is_ub(c)).map(|c| vec![
c.league.clone(), c.season.clone(), c.team.clone(),
c.played.to_string(), format!("{}W {}D {}L", c.w, c.d, c.l),
format!("{}/{}", c.gf, c.ga),
format!("+{}", c.margin),
]).collect();
mars_table(&["league", "season", "champion", "played", "w-d-l", "gf/ga", "margin"], &ub_rows);
| league | season | champion | played | w-d-l | gf/ga | margin |
|---|---|---|---|---|---|---|
| England | English Premier League | 2003/04 | Arsenal | 38 | 26W 12D 0L | 73/26 | +11 |
| Germany | German Bundesliga | 2023/24 | Leverkusen | 34 | 28W 6D 0L | 89/24 | +17 |
| Greece | Greek Super League | 2018/19 | PAOK | 30 | 26W 4D 0L | 66/14 | +10 |
| Italy | Italian Serie A | 2011/12 | Juventus | 38 | 23W 15D 0L | 68/20 | +4 |
| Netherlands | Dutch Eredivisie | 1994/95 | Ajax | 34 | 27W 7D 0L | 106/28 | +12 |
| Portugal | Portuguese Liga Portugal | 2010/11 | Porto | 30 | 27W 3D 0L | 73/16 | +21 |
| Portugal | Portuguese Liga Portugal | 2012/13 | Porto | 30 | 24W 6D 0L | 70/14 | +1 |
| Scotland | Scottish Premiership | 2016/17 | Celtic | 38 | 34W 4D 0L | 106/25 | +30 |
| Scotland | Scottish Premiership | 2020/21 | Rangers | 38 | 32W 6D 0L | 92/13 | +25 |
The price of invincibility
The romantic version says unbeaten teams choose to avoid defeat — meaning more draws, fewer wins, points dropped through stalemates. The data version: does the win/draw/loss mix actually shift as defeats approach zero, or do unbeaten teams simply win almost everything?
// draw rate and points-dropped-by-draws by defeat bucket
let draw_rows: Vec<Vec<String>> = (0..6).map(|b| {
let ts: Vec<&TS> = all_ts.iter().filter(|t| bucket(t.l) == b).collect();
if ts.is_empty() { return vec![bnames[b].to_string(), "0".to_string()]; }
let games: i64 = ts.iter().map(|t| t.played).sum();
let draws: i64 = ts.iter().map(|t| t.d).sum();
let pts_dropped = 2 * draws; // each draw costs 2 pts vs a win
vec![
bnames[b].to_string(), ts.len().to_string(),
format!("{:.1}%", 100.0 * draws as f64 / games as f64),
pts_dropped.to_string(),
format!("{:.1}", pts_dropped as f64 / ts.len() as f64),
]
}).collect();
mars_table(&["defeats", "team-seasons", "draw rate", "pts lost to draws", "avg per team"], &draw_rows);
// head-to-head: unbeaten vs one-defeat team-seasons on W/D/L mix
let mix = |pred: &dyn Fn(&TS) -> bool| -> (f64, f64, f64, f64) {
let ts: Vec<&TS> = all_ts.iter().filter(|t| pred(t)).collect();
let g: i64 = ts.iter().map(|t| t.played).sum();
let w: i64 = ts.iter().map(|t| t.w).sum();
let d: i64 = ts.iter().map(|t| t.d).sum();
let l: i64 = ts.iter().map(|t| t.l).sum();
(100.0*w as f64/g as f64, 100.0*d as f64/g as f64, 100.0*l as f64/g as f64, ts.len() as f64)
};
let (w0,d0,l0,n0) = mix(&|t| t.l == 0);
let (w1,d1,l1,n1) = mix(&|t| t.l == 1);
let (w2,d2,l2,n2) = mix(&|t| t.l == 2);
println!("0 defeats (n={}): {:.1}%W {:.1}%D {:.1}%L", n0 as i64, w0, d0, l0);
println!("1 defeat (n={}): {:.1}%W {:.1}%D {:.1}%L", n1 as i64, w1, d1, l1);
println!("2 defeats (n={}): {:.1}%W {:.1}%D {:.1}%L", n2 as i64, w2, d2, l2);
0 defeats (n=10): 78.5%W 21.5%D 0.0%L
1 defeat (n=38): 76.7%W 20.3%D 2.9%L
2 defeats (n=86): 73.1%W 21.0%D 5.9%L
| defeats | team-seasons | draw rate | pts lost to draws | avg per team |
|---|---|---|---|---|
| 0 | 10 | 21.5% | 148 | 14.8 |
| 1 | 38 | 20.3% | 528 | 13.9 |
| 2 | 86 | 21.0% | 1222 | 14.2 |
| 3 | 158 | 22.3% | 2382 | 15.1 |
| 4-6 | 791 | 24.3% | 12992 | 16.4 |
| 7+ | 8834 | 26.0% | 161614 | 18.3 |
Rarity and parity
Two questions: is the unbeaten season actually rare, and does league parity predict it? For each league we count seasons covered, unbeaten campaigns, champion concentration (did one club win everything?) and the average points margin between 1st and 2nd — the parity proxy.
// per-league summary
struct LG { name: String, seasons: usize, unbeaten: usize, champs: usize, top_champ_share: f64, avg_margin: f64 }
let mut lg_map: std::collections::BTreeMap<String, (usize, usize, std::collections::BTreeMap<String, usize>, f64, usize)> = std::collections::BTreeMap::new();
for (lg, sn) in &complete_ls {
let st = standings(lg, sn);
if st.len() < 2 { continue; }
let e = lg_map.entry(lg.clone()).or_insert((0, 0, std::collections::BTreeMap::new(), 0.0, 0));
e.0 += 1;
*e.2.entry(st[0].team.clone()).or_insert(0) += 1;
e.3 += (st[0].pts - st[1].pts) as f64;
e.4 += 1;
}
// unbeaten count per league from earlier `unbeaten` list
for u in &unbeaten {
if let Some(e) = lg_map.get_mut(&u.league) { e.1 += 1; }
}
let mut lg_rows: Vec<Vec<String>> = Vec::new();
for (lg, (seasons, ub, champ_map, margin_sum, mcount)) in &lg_map {
if *seasons < 3 { continue; }
let top_share = *champ_map.values().max().unwrap_or(&0) as f64 / *seasons as f64;
let top_team = champ_map.iter().max_by_key(|(_, c)| *c).map(|(t, _)| t.clone()).unwrap_or_default();
lg_rows.push(vec![
lg.clone(), seasons.to_string(), ub.to_string(),
format!("{:.0}%", 100.0 * top_share), top_team,
format!("{:.1}", margin_sum / *mcount as f64),
]);
}
lg_rows.sort_by(|a, b| b[1].parse::<usize>().unwrap_or(0).cmp(&a[1].parse::<usize>().unwrap_or(0)));
mars_table(&["league", "seasons", "unbeaten", "top club title share", "most titles", "avg 1st-2nd gap"], &lg_rows);
| league | seasons | unbeaten | top club title share | most titles | avg 1st-2nd gap |
|---|---|---|---|---|---|
| Italy | Italian Serie A | 34 | 1 | 47% | Juventus | 7.2 |
| Spain | Spanish La Liga | 34 | 0 | 53% | Barcelona | 6.3 |
| England | English Premier League | 33 | 1 | 36% | Man United | 6.9 |
| France | French Ligue 1 | 33 | 0 | 39% | Paris SG | 8.7 |
| Germany | German Bundesliga | 33 | 1 | 70% | Bayern Munich | 8.6 |
| Netherlands | Dutch Eredivisie | 33 | 1 | 42% | PSV Eindhoven | 7.3 |
| Portugal | Portuguese Liga Portugal | 33 | 3 | 55% | Porto | 6.7 |
| Scotland | Scottish Premiership | 32 | 2 | 66% | Celtic | 11.2 |
| Turkey | Turkish Süper Lig | 32 | 0 | 50% | Galatasaray | 4.7 |
| Belgium | Belgian Pro League | 31 | 0 | 35% | Anderlecht | 6.0 |
| Greece | Greek Super League | 27 | 1 | 67% | Olympiakos | 9.9 |
| Brazil | Serie A | 15 | 0 | 27% | Palmeiras | 7.9 |
| Finland | Veikkausliiga | 15 | 0 | 53% | HJK | 6.1 |
| Japan | J1 League | 15 | 0 | 27% | Kawasaki Frontale | 5.8 |
| Mexico | Liga MX | 15 | 0 | 47% | Club America | 6.0 |
| Norway | Eliteserien | 15 | 0 | 33% | Bodo/Glimt | 8.3 |
| Poland | Ekstraklasa | 15 | 0 | 47% | Legia | 4.3 |
| Romania | Superliga | 15 | 0 | 33% | FCSB | 6.9 |
| Sweden | Allsvenskan | 15 | 0 | 53% | Malmo FF | 4.8 |
| United States | MLS | 15 | 0 | 13% | Toronto FC | 5.0 |
| Argentina | Liga Profesional | 14 | 0 | 43% | Boca Juniors | 3.4 |
| Austria | Bundesliga | 14 | 0 | 79% | Salzburg | 11.0 |
| Denmark | Superliga | 14 | 0 | 50% | FC Copenhagen | 6.6 |
| Ireland | Premier Division | 14 | 0 | 36% | Shamrock Rovers | 7.1 |
| Russia | Premier League | 14 | 0 | 57% | Zenit | 5.5 |
| Switzerland | Super League | 14 | 0 | 43% | Young Boys | 13.1 |
| China | Super League | 13 | 0 | 46% | Guangzhou Evergrande | 3.8 |
// unbeaten events by decade
let mut decades: std::collections::BTreeMap<String, usize> = std::collections::BTreeMap::new();
for u in &unbeaten {
let y: i32 = u.season[..4].parse().unwrap_or(0);
let d = format!("{}s", y / 10 * 10);
*decades.entry(d).or_insert(0) += 1;
}
let dec_rows: Vec<Vec<String>> = decades.iter().map(|(d, c)| vec![d.clone(), c.to_string()]).collect();
mars_table(&["decade", "unbeaten team-seasons"], &dec_rows);
| decade | unbeaten team-seasons |
|---|---|
| 1990s | 1 |
| 2000s | 1 |
| 2010s | 5 |
| 2020s | 3 |
The picture
Two views: the defeats-gradient curve (does performance jump at zero or slide smoothly?), and the unbeaten champions against the most dominant champions on the underlying metrics.
use plotters::prelude::*;
// chart 1: mean ppg by defeat bucket — all teams vs top-4 finishers
let labels = ["0", "1", "2", "3", "4-6", "7+"];
let ymax = ppg_all.iter().chain(ppg_t4.iter()).cloned().fold(0.0f64, f64::max) * 1.15;
let nb = 6usize;
let fig1 = plotters::evcxr::evcxr_figure((760, 420), |root| {
root.fill(&WHITE)?;
let mut chart = ChartBuilder::on(&root)
.caption("Points per game by number of defeats", ("sans-serif", 18))
.margin(15)
.x_label_area_size(40)
.y_label_area_size(45)
.build_cartesian_2d(-0.5..(nb as f64 - 0.5), 0.0..ymax)?;
chart.configure_mesh().x_labels(nb)
.x_label_formatter(&|x: &f64| {
let i = (*x).round() as usize;
if i < 6 { labels[i].to_string() } else { String::new() }
})
.draw()?;
for b in 0..nb {
let x = b as f64;
// all teams: light blue; top-4 finishers: dark blue
chart.draw_series(std::iter::once(Rectangle::new(
[(x - 0.4, 0.0), (x - 0.05, ppg_all[b])], &CYAN,
)))?;
chart.draw_series(std::iter::once(Rectangle::new(
[(x + 0.05, 0.0), (x + 0.4, ppg_t4[b])], &BLUE,
)))?;
}
Ok(())
});
fig1.evcxr_display();
println!("light = all team-seasons | dark = top-4 finishers only");
// chart 2: unbeaten champions vs other champions — 4 metrics, grouped bars
let ub_f = champs.iter().filter(|c| c.l == 0).collect::<Vec<_>>();
let ot_f = champs.iter().filter(|c| c.l > 0).collect::<Vec<_>>();
let avg = |v: &[&Champ], f: &dyn Fn(&Champ) -> f64| -> f64 {
if v.is_empty() { 0.0 } else { v.iter().map(|c| f(c)).sum::<f64>() / v.len() as f64 }
};
let mlabels = ["ppg", "win%", "draw%", "gd/g"];
let ub_vals = [
avg(&ub_f, &|c| c.pts as f64 / c.played as f64),
avg(&ub_f, &|c| 100.0 * c.w as f64 / c.played as f64),
avg(&ub_f, &|c| 100.0 * c.d as f64 / c.played as f64),
avg(&ub_f, &|c| (c.gf - c.ga) as f64 / c.played as f64),
];
let ot_vals = [
avg(&ot_f, &|c| c.pts as f64 / c.played as f64),
avg(&ot_f, &|c| 100.0 * c.w as f64 / c.played as f64),
avg(&ot_f, &|c| 100.0 * c.d as f64 / c.played as f64),
avg(&ot_f, &|c| (c.gf - c.ga) as f64 / c.played as f64),
];
let ymax2 = ub_vals.iter().chain(ot_vals.iter()).cloned().fold(0.0f64, f64::max) * 1.2;
let fig2 = plotters::evcxr::evcxr_figure((760, 420), |root| {
root.fill(&WHITE)?;
let mut chart = ChartBuilder::on(&root)
.caption("Unbeaten champions vs all other champions", ("sans-serif", 18))
.margin(15)
.x_label_area_size(40)
.y_label_area_size(45)
.build_cartesian_2d(-0.5..3.5, 0.0..ymax2)?;
chart.configure_mesh().x_labels(4)
.x_label_formatter(&|x: &f64| {
let i = (*x).round() as usize;
if i < 4 { mlabels[i].to_string() } else { String::new() }
})
.draw()?;
for i in 0..4 {
let x = i as f64;
chart.draw_series(std::iter::once(Rectangle::new(
[(x - 0.4, 0.0), (x - 0.05, ub_vals[i])], &RED,
)))?;
chart.draw_series(std::iter::once(Rectangle::new(
[(x + 0.05, 0.0), (x + 0.4, ot_vals[i])], &BLUE,
)))?;
}
Ok(())
});
fig2.evcxr_display();
light = all team-seasons | dark = top-4 finishers only
println!("red = unbeaten champions (n={}) | blue = other champions (n={})", ub_f.len(), ot_f.len());
red = unbeaten champions (n=9) | blue = other champions (n=567)
Discussion
The unbeaten season is real but rare — and it's the tail of a consistency gradient, not a separate category.
1. Zero defeats is not special — it's just the end of a smooth curve. Mean points per game by defeats: 2.58 (0), 2.51 (1), 2.40 (2), 2.28 (3), 2.05 (4–6), 1.28 (7+). The gap between unbeaten and one-defeat (0.07 ppg) is smaller than between one and two defeats (0.11). There is no discontinuity at zero — consistency is continuous.
2. Unbeaten teams don't "play not to lose" — they win more. Draw rates by defeats: 21.5% (0), 20.3% (1), 21.0% (2), 22.3% (3), 24.3% (4–6), 26.0% (7+). The romantic hypothesis predicted unbeaten teams would settle for draws; they actually draw less than average and post the highest win rate of any bucket (78.5%).
3. Unbeaten champions ARE the most dominant champions — barely. Nine unbeaten champions across 576 title winners: 2.60 ppg, 80% wins, 0.58 goals conceded per game — better than both margin champions (≥10pts, n=163: 2.35 ppg, 0.79 ga/g) and ordinary champions (2.17 ppg, 0.87 ga/g). But their average margin (14.6 pts) is identical to the margin champions'. Porto 2012/13 went unbeaten by one point; Juventus 2011/12 by four. Invincibility and dominance are correlated, not synonymous.
4. The counterexamples prove the distinction. Benfica 2025/26 went unbeaten and finished third. PAOK 2018/19 went unbeaten and won by 10 — in a league where Olympiacos had won 6 of the previous 7 titles.
5. Rarity: 10 unbeaten team-seasons in 592 league-seasons (~1.7% of team-seasons, ~0.1% of all team-seasons). By decade: 1 (1990s), 1 (2000s), 5 (2010s), 3 (2020s so far) — possibly more common recently, though n is tiny. Portugal (3) and Scotland (2) dominate the list; 20 of 28 leagues have never produced one.
Verdict. An unbeaten season is a genuine achievement — the nine unbeaten champions are statistically the most dominant title winners — but it is not a different kind of achievement. It is what the best teams look like when variance breaks their way: the same teams that post 100+ point seasons also post the occasional unbeaten one. The cliché survives only in its weakest form: unbeaten champions concede fewer goals (0.58/g) than any other champion group — defence still matters — but they don't win more, draw more, or win by more than the biggest-margin champions.
Caveats: n=9 unbeaten champions means the champion comparison is descriptive, not inferential; league formats differ (30–38 games); repeated clubs (Porto ×2, Celtic/Rangers) cluster the sample; xG unavailable; association is not causation.
Source: 176,903 deduplicated top-flight matches across 28 leagues, 592 complete league-seasons, 1990s → 2026.
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
Unbeaten teams don't "play not to lose" — they win more. Together these results answer the research question posed in the Introduction and quantify the pattern across hundreds of thousands of matches. The notebook provides a fully reproducible pipeline from raw CSV extracts to published figures.