Basketball Data Science Code on GitHub
Every five-man lineup, two seasons

Who actually moves the scoreboard? Player value with honest error bars

Every plus-minus argument has the same flaw: the players you share the floor with. A bench guard who rides shotgun with the MVP posts a glowing on/off number; a good starter marooned on a bad roster posts a grim one. This study builds the core of the standard remedy, regularized (ridge) regression over every five-man lineup, which adjusts each player for his teammates. Season lineup totals do not record opponents, so this model does not adjust for them; a second, opponent-adjusted model (full RAPM, built from stints) is fitted for both seasons as a check. The study builds everything twice, in R and Python, for 2023-24 and the just-completed 2025-26 season. Then it does the two things public plus-minus work most often skips: it reports uncertainty, and it rebuilds each season's values from a second unit of observation to see if the answer holds.

Terms used in this analysis
Median interval width
±2.5 pts/100
One public season cannot separate the 5th-best player from the 30th.
Cross-model agreement
0.97
Spearman between the lineup and stint models on the same 2023-24 games (0.97 in 2025-26): a check on the builds, not an independent replication.
Stints parsed
62,658
Substitution-to-substitution units from all 1,230 games of 2023-24 play-by-play (69,688 in 2025-26).
Home-court advantage
+2.1 pts/100
Estimated as a byproduct of the 2023-24 stint model, not assumed (+1.7 in 2025-26).
The method

Shrinkage chosen by prediction, not by hand

Both models in this study turn basketball into rows of a regression, one row per unit of play, and differ in what a row holds. The diagram below draws one real row of each.

How each model turns basketball into one row of a regressionLineup modelOne row per five-man lineup, summed overthe seasonMIL's best high-volume lineup+1Brook Lopez+1Damian Lillard+1Khris Middleton+1Giannis Antetokounmpo+1Malik Beasley0every other playerOutcome: +199 over 1,302 possessions =+15.3 per 100Weight: 1,302 possessionsOpponents: not in the season totals, so notadjusted forStint modelOne row per stint: no substitution byeither teamIND at MIL, fourth quarter, 7:33 to 0:00MIL (home)+1Lopez+1Lillard+1Middleton+1Antetokounmpo+1BeasleyIND (away)−1Haliburton−1Mathurin−1McConnell−1Toppin−1Turner1intercept: home-court advantageOutcome: MIL 14, IND 25 over 18.2possessions = −60.3 per 100Weight: 18.2 possessionsOpponents: on the same row, so every playeris adjusted for the other nineBoth models stack their rows and fit a possession-weighted ridge regression, with thepenalty chosen by cross-validation. Each player's coefficient is his net points per 100possessions with the other players on the floor accounted for.Rows in 2023-24: 15,484 lineups; 33,139 stints, after slivers such as a lineup on the floor forone free throw were merged into the next stint (62,658 parsed).
How each model turns basketball into one row of a regressionLineup modelOne row per five-man lineup, summed over theseasonMIL's best high-volume lineup+1Brook Lopez+1Damian Lillard+1Khris Middleton+1Giannis Antetokounmpo+1Malik Beasley0every other playerOutcome: +199 over 1,302 possessions =+15.3 per 100Weight: 1,302 possessionsOpponents: not in the season totals, so notadjusted forStint modelOne row per stint: no substitution by eitherteamIND at MIL, fourth quarter, 7:33 to 0:00MIL (home)+1Lopez+1Lillard+1Middleton+1Antetokounmpo+1BeasleyIND (away)−1Haliburton−1Mathurin−1McConnell−1Toppin−1Turner1intercept: home-court advantageOutcome: MIL 14, IND 25 over 18.2possessions = −60.3 per 100Weight: 18.2 possessionsOpponents: on the same row, so every player isadjusted for the other nineBoth models stack their rows and fit apossession-weighted ridge regression, with thepenalty chosen by cross-validation. Eachplayer's coefficient is his net points per 100possessions with the other players on thefloor accounted for.Rows in 2023-24: 15,484 lineups; 33,139 stints,after slivers such as a lineup on the floor forone free throw were merged into the next stint(62,658 parsed).
One real row from each model. The lineup model sees a five-man unit's season total and its five players; the stint model sees one stretch without substitutions, both fives, and which team was at home. Both are fitted the same way, by possession-weighted ridge regression.

The model's one free knob, how hard to shrink, is not a taste decision. Cross-validation chooses the ridge penalty (λ = 3200 in both seasons). The figure below shows the held-out error across the penalty grid. The curve is nearly flat around its minimum (its axis does not start at zero), so the choice is defensible but not sharp: nearby penalties predict almost as well, and they can reorder the players near the top.

The cross-validation curve that picks the ridge penalty. Shrinkage is the difference between this model and raw on/off, and the figure shows the amount was chosen by held-out prediction, not by hand. The curve is nearly flat near the minimum: the axis is zoomed in.
Raw on/off versus the regularized estimate for every qualifying player. The before/after of the method: the players pulled hardest toward zero are the low-minute profiles whose raw numbers rest on the least evidence, one dot per player.
The ranking

The error bars are the real headline

What comes out the other side passes the eye test at the top: Jokić (+5.5 per 100), Anunoby, Brunson, George, Gilgeous-Alexander lead 2023-24; Wembanyama (+6.5) and Gilgeous-Alexander lead 2025-26. These rankings come from the lineup model, which adjusts for teammates but not opponents.

Adding opponents (the stint model below) puts Victor Wembanyama (+6.5 per 100, 95% interval +4.2 to +9.1) first in 2025-26 and Shai Gilgeous-Alexander (+6.3 per 100, 95% interval +3.9 to +8.5) second, and Jalen Brunson (+5.4 per 100, 95% interval +3.0 to +7.7) first in 2023-24; the intervals resample whole games and overlap about as widely as the lineup model's. But the study's real headline is the width of the intervals: the median 95% bootstrap CI spans about ±2.5 points per 100 possessions. Those ranges describe the ridge estimate, which ridge pulls toward zero, so they are not confidence intervals for a player's true value. The ranks are less certain than the order: in the bootstrap, Nikola Jokić is first in 18% of refits and in the top 10 in 76% (2023-24), and Victor Wembanyama is first in 31% (2025-26). One season of lineup data cannot separate the 5th-best player from the 30th.

The 2023-24 player values with their bootstrap ranges: the most important figure in the study because of the error bars. The ordering is the headline everywhere else; here the message is how much the ranges overlap, which is what a front office needs to know before acting on a single-season number. The chart shows the five highest and five lowest players; the full ranking is in the season's output/player_values.csv.
The cross-check

Two models on the same games

A ranking with intervals still deserves suspicion if it only exists in one model. So the study rebuilds each season's valuation from scratch at a different grain, starting with 2023-24: 62,658 substitution-to-substitution stints parsed from all 1,230 games of play-by-play, with an opponent-adjusted design. Its unpenalized intercept lands at +2.1 points per 100 (95% interval +1.3 to +2.8, resampling whole games). That is the home-court advantage, estimated as a byproduct rather than assumed, and a built-in sanity check that the design matrix means what it claims. The two models use different NBA feeds, but they cover the same games and possessions and share the fitting method and the possession threshold, so they share that season's noise.

Two builds of player value on the same games, and where they meetLineup modelSOURCEthe NBA's season lineup totals(stats.nba.com)UNIT15,901 five-man lineupsAUDITlineup plus-minus re-adds to everyteam's season total (largest miss: 0points)MODELridge on each lineup's five players,teammates onlyRESULT454 player valuesStint modelSOURCEthe season's play-by-play, event byeventUNIT62,658 stints from 1,230 gamesAUDITplus-minus matches the NBA's own feedin 99.8% of player-gamesMODELridge on both fives, with opponentsRESULT454 player values, and home court worth+2.1 per 100 as a byproductWHERE THEY MEET454 players are in both. Ranked by each model, theirorders agree with a Spearman correlation of 0.97.The two builds share the games, the fitting method, and the threshold, so agreement checks thebuilds, not whether the values reflect the players.
Two builds of player value on the same games, and where they meetLineup modelSOURCEthe NBA's season lineup totals(stats.nba.com)UNIT15,901 five-man lineupsAUDITlineup plus-minus re-adds to every team'sseason total (largest miss: 0 points)MODELridge on each lineup's five players,teammates onlyRESULT454 player valuesStint modelSOURCEthe season's play-by-play, event by eventUNIT62,658 stints from 1,230 gamesAUDITplus-minus matches the NBA's own feed in99.8% of player-gamesMODELridge on both fives, with opponentsRESULT454 player values, and home court worth+2.1 per 100 as a byproductWHERE THEY MEET454 players are in both. Ranked by eachmodel, their orders agree with a Spearmancorrelation of 0.97.The two builds share the games, the fittingmethod, and the threshold, so agreement checks thebuilds, not whether the values reflect theplayers.
The two builds side by side. Each starts from its own NBA feed, passes its own audit against the NBA's totals or an outside feed, and is fitted on its own rows; they meet only at the end, where their player rankings are compared. Both cover the same 2023-24 games.

Correction, October 19, 2026. The first stint build put events in the feed's numbering order, which is not the order they happened, and gave free throws to whoever was on the floor at the free throw instead of at the foul. Its league totals still checked out, so nothing flagged it. Checked player by player against the NBA's own feeds, it now matches: plus-minus is exact for 99.8% of player-games, up from 41%. The ranking barely moved (the two models now agree at 0.97, up from 0.96), and the figures here are from the corrected build.

Stint-level RAPM against the aggregate lineup model, one dot per player (Spearman 0.97). Both models are fitted on the same 2023-24 games, so the agreement is consistent with sound builds (the per-player gates, not the agreement, are what catch build errors) and shows that adding opponents moves the values little; it does not show that the values reflect the players rather than noise. Departures from the diagonal mix the opponent term, a different possession count, and noise.

For 2025-26 the study builds 69,688 stints the same way, except for one step: no file the 2023-24 lineup tool can read exists for that season, so the ten players on court are inferred from the play-by-play events themselves. The inferred stints match the NBA's season plus-minus exactly for 476 of 582 players (2023-24: 459 of 572) and season minutes within one minute for 100% of them. The home-court term is +1.7 per 100 (95% interval +0.9 to +2.4), and the two models agree at Spearman 0.97 (95% interval 0.96 to 0.97).

The same comparison for 2025-26, one dot per player. These stints come from on-court players inferred from the play-by-play events and checked against the NBA's season totals; the agreement with the lineup model is as close as in 2023-24. Departures from the diagonal mix the opponent term, a different possession count, and noise.

The agreement is consistent with sound builds; the per-player gates, not the agreement, are what catch build errors. The evidence on whether the values reflect the players is the cross-season check: for the 317 players fitted in both 2023-24 and 2025-26, estimates correlate at r = 0.31 (95% interval 0.20 to 0.40). One season's value carries over only weakly.

Five-man units

Lineup ratings carry wide intervals

Lineups themselves get the descriptive treatment, with a volume filter: among five-man units with 1,000+ possessions, the highest observed rate in 2023-24 was Milwaukee's Lopez–Lillard–Middleton–Antetokounmpo– Beasley at +15.3 per 100 over 1,302 possessions. In 2023-24 the highest of 10 such lineups (MIL, +15.3) has a 95% interval of +5.6 to +24.9, overlapping the intervals of all 9 others, and the player model implies +8.5 for the same five. In 2025-26 the highest of 4 such lineups (CHA, +26.6) has a 95% interval of +15.8 to +37.3, overlapping 2 of the other 3 intervals, and the player model implies +9.3 for the same five. The highest of a handful of lineups also tends to overstate its true level. The reconstruction gates check that the lineup harvest adds up to the NBA's team totals; they do not check any lineup's rating.

The takeaway

Trust the tier, not the rank

The takeaway for a decision-maker is deliberately modest: with one public season, trust the tier, not the rank; trust a value more when it holds up across seasons, not only across two models fitted to the same games; and treat any lineup-value claim without an error bar as marketing.

What one season's intervals can and cannot separate1. Three tiersAll 454 players with 300+ possessions in 2023-24, sorted by where their 95% interval sitsagainst zero (league average)40 clearly above average388 cannot tell from average26 clearly below average2. Ranks the 5th-ranked player cannot be separated fromEach dot is one of the top 70 players' estimates. The band is Shai Gilgeous-Alexander's 95%interval (+2.2 to +7.3 per 100).0#5 Gilgeous-Alexander#30 Pritchardranks 1 to 53: inside the bandrank 70Trust the tier, not the rank: the data place these players near the top, but cannot orderthem within it.
What one season's intervals can and cannot separate1. Three tiersAll 454 players with 300+ possessions in 2023-24,sorted by where their 95% interval sits againstzero (league average)40clearly above average388cannot tell from average26clearly below average2. Ranks the 5th-ranked playercannot be separated fromEach dot is one of the top 70 players' estimates.The band is Shai Gilgeous-Alexander's 95% interval(+2.2 to +7.3 per 100).0#5 Gilgeous-Alexander#30 Pritchardranks 1 to 53: inside the bandrank 70Trust the tier, not the rank: the data placethese players near the top, but cannot orderthem within it.
What the intervals allow. Top: most players cannot be told apart from league average in one season, and only a small group sits clearly above or below it. Bottom: the 5th-ranked player's interval holds the estimates of a long run of ranks, including the 30th, which is why the tier is the claim to trust and the rank is not.

Additional figures

Player values (2025-26)
Shrinkage (2025-26)
Cv curve (2025-26)

Method, code, and verification

The full technical write-up (data provenance, model specification, validation gates, and stated limitations) is the README. The analysis is implemented independently in R and Python and reconciled to numeric tolerance; the stint builders run in Python only (2023-24 uses the nba-on-court package, 2025-26 its own PlayByPlayV3 builder), and R starts from the built stints. run_checks.sh replays every gate.