The xBA blind spot
An instrument for reading what expected batting average cannot see. Pick a contact cell and watch its outcome spread across the field, in any of the thirty ballparks.
Statcast’s expected batting average is a function of exit velocity and launch angle, both fixed at the moment of contact. Two things that decide the outcome happen afterward — which direction the ball went and how far it carried — and xBA has a term for neither.
This is the tool I built to look into that gap. The write-up of what I found in it is The xBA blind spot; this page is about the instrument.
It ships from the same repository as the analysis behind it, deployed straight from that repo rather than copied into this site — one build, one place to update.
What it does
Pick any cell of the exit-velocity and launch-angle grid — every ball in it is, as far as xBA is concerned, the same batted ball — and the chart beside it plots what actually happened to those balls against the direction they were hit. In the hardest-hit cells the expected value is flat across the whole field while real outcomes swing by more than nine hundred points of batting average.
Everything runs against any of the thirty ballparks, plus the two temporary ones in Sacramento and Tampa. Beyond the spray gradient it carries a field map of where each park gains and loses hits, carry distance against league expectation, the strikeout park factor with personnel held fixed, hit-type mix, and a season-by-season breakdown.
How it is built
699,693 batted balls, 2021–2026 regular season, pulled from Baseball Savant with plyball — my own scraper — and aggregated in pandas. The front end is d3, and the whole application is a single self-contained file with the library and all of its data inlined, so it makes no network requests after it loads.
Three decisions did most of the work:
- The league is the reference, not zero. xBA is not unbiased over all batted balls: league-wide, batting average runs .0048 above expected, and the offset drifts year to year. Scoring parks against zero would overstate every one of them by about five points.
- Carry residual isolates the park from the defence. Every ball hit in the air is compared against the league’s median distance for its own exit-velocity and launch-angle cell. Positioning cannot change how far a ball flies. Coors Field returning +16 ft is the control that says the measurement works.
- Counts sit next to percentages everywhere. A −49% on triples looks like the headline until you notice triples are half a percent of contact and it amounts to ten hits a season, while an unremarkable −5.5% on singles costs four times as many.
The park factors hold personnel fixed by following each home club’s hitters and its pitchers in and out of their own building, rather than comparing raw rates that mostly measure the roster.