Inspiration
As a returner, I spend most points guessing. Before the ball is even struck, I have to lean one way, and against a good server a wrong guess usually costs the point. Professional players do not have to guess blind: their teams employ analysts who chart where every opponent serves. College and junior players rarely have that support. I wanted to find out whether a serving habit can actually be measured from public data, whether it holds up from match to match, and whether it changes when the pressure rises.
A few tennis terms
- Server and returner. Every point starts with a serve. The server hits it into a box on the other side of the net, and the returner tries to hit it back.
- First and second serve. A server gets two attempts. If the first serve misses, the second is usually slower and safer, so this project focuses mainly on first serves.
- Deuce side and ad side. Points alternate between the right half of the court (deuce side) and the left half (ad side). Servers often aim differently from each side, so every result here is split by side.
- Out wide, at the body, down the middle. The three directions a serve can go: toward the outside edge of the service box, straight at the returner, or toward the center line (also called the "T").
- Break point. A point where the returner can win the game if they win that one point. It is the highest-pressure moment for a server.
- Tiebreak. A special game played at 6 games all to decide a set. Its scoring and serving order differ from normal games, so tiebreak points are left out.
- No-ad deciding point. In some formats, a game tied at deuce is decided by one point, and the returner chooses the side. Because the side is not set by the usual rule, these points are left out.
What it does
Serve IQ is a serve scouting tool for returners and their coaches. It answers one question: where should I expect this player to serve, and does that change on break points?
Call the serve. You pick a pro and a court side, then call where you expect the first serve to go: out wide, at the body or down the middle. The court draws the real serve paths, and the result shows how often that player served there, next to the lane a typical pro serves to most and a random guess. Break points. One button turns the point into a break point, and the paths re-weight using only that player's break-point serves. Scouting card. Each player and side gets a card with the favorite lane and its 95% range, how lopsided the habit is compared with other pros, any break-point change that passes its test, and how many charted serves it takes to tell the top two lanes apart. Explorer. A chart of all 894 first-serve player-sides shows which ones are worth scouting: 202 have a clear edge over guessing like the typical pro, and 40 show a clear break-point change. Match model. For players nobody charts, a separate model reads a broadcast match video and writes the same kind of chart: server, side, score, break points, serve lane and point winner. For example, Nick Kyrgios serves down the middle on 50 of 100 first serves from the ad side (range 48 to 52, from 4,418 charted serves). On break points, out wide rises to 60 in 100. A returner who knows that walks on court with a plan.
How we built it
Data. The source is Jeff Sackmann's Match Charting Project, in which volunteers record professional matches shot by shot. I parsed every point code into one row per serve, 2.56 million in total, and corrected common charting slips: repeated points, a second serve logged after the first serve went in, and one player listed under two names. After removing tiebreak points (3%), serves with no recorded direction (0.2%), unknown handedness and no-ad deciding points, 2,473,821 serves from 1,738 servers remain. To check the parser, I compared my totals with the project's own per-match serve-direction totals; they agree exactly for 99.0 to 99.6% of player-matches. Scouting cards cover the 447 pros (249 men, 198 women) with at least 300 charted first serves per side and 10 charted matches.
Statistics.
- Each player's direction mix is compared with a typical pro re-weighted to the same mix of left- and right-handed opponents, using a Wald test with errors clustered by match.
- Win rates by direction and break-point shifts for each player use Cochran-Mantel-Haenszel tests stratified by match, so a player is only compared with themselves within the same match.
- The tour-wide break-point shift comes from a linear model with fixed effects for each match, server and side, with errors clustered by both server and returner.
- In total there are 8,929 tests in three families, and Benjamini-Hochberg correction holds the false discovery rate at 5% in each.
- To see which results repeat, I split each player's matches into two random halves and correlated the halves across players.
The number of charted serves needed to tell the top two lanes apart, with shares $p_1$ and $p_2$, is
$$d = p_1 - p_2, \qquad n = \frac{z^2\,(p_1 + p_2 - d^2)}{d^2}, \qquad z = 1.96$$
which is a rule of thumb from the observed shares, not a power calculation. The median side needs about 375 serves, roughly 10 matches.
Site. Python precomputes small JSON tables. The site is hand-written HTML, CSS and JavaScript with KaTeX for the 14 formulas on the Method page, hosted on Netlify with a Streamlit backup. A checker script recomputes every number on the site and in the documentation from the data files (78 checks), and a Playwright browser test clicks through the page at desktop and phone sizes (75 checks).
Match model. A separate Python program for macOS finds the main camera shots in a broadcast, reads the on-screen score with Apple Vision, rebuilds the score with a full tennis rules engine, fits the court lines, tracks players with YOLO and the ball with classical tracking, and sorts each serve bounce into a lane. It has 70 passing unit tests.
Challenges we ran into My first version asked which serve direction wins the most points. The data did not support it. Only 24 of 447 players show a clear win-rate gap by direction on first serves, none do on second serves, and the gap barely repeats between the two halves of a player's matches (correlation of -0.02 to 0.17). This is consistent with game theory: if one direction clearly won more, servers would use it until it stopped working. The serving habit itself does repeat (correlation of 0.57 to 0.69), so I rebuilt the tool around where a player serves instead of which lane wins.
The second challenge was guarding thousands of tests against chance. With that many comparisons, some players look unusual by luck alone, so every test family is corrected for false discoveries and every interval is clustered by match.
For the match model, the hardest part was preventing it from guessing. When it cannot see the bounce clearly, it leaves the lane blank rather than inventing one.
Accomplishments that we're proud of I kept the main result even though part of it is a null finding: most players do not win more by serving to one lane. Every number on the site is read from the data files and verified by a script, not typed by hand. On a 10-point demo clip of Sinner and Alcaraz, the match model named the lane for 8 of 10 serves, all 8 matched a chart made by eye, and it identified the point winner on all 10 points. The site shows its blanks next to its correct calls. What we learned A pattern in sports data only counts if it survives a fair test, and the first idea I was most excited about did not. I learned to split data in half to check whether a result repeats, to correct for running thousands of tests, and to report what the data cannot show as clearly as what it can. I also learned that a smaller, verified claim is more useful to a coach than a large claim that falls apart under scrutiny.
What's next for Serve IQ Test the match model on new matches, including college streams with break points, and compare its lanes with volunteer charts of the same serves. Let a coach load several matches of one opponent and open the result in the same scouting card. Give the card to college coaches before real matches and log each call against where the serve actually went, so its value is measured. Limits. Volunteers choose which matches to chart, the charts record where the serve went but not what the returner did, and win rates by direction are observational. The match model was tuned on its demo clip, which contains no break points.
Data and license. Match Charting Project by Jeff Sackmann and contributors (CC BY-NC-SA 4.0). Code: MIT, except the match model, which uses Ultralytics and is GNU AGPLv3. Player photos: Wikimedia Commons, credited on the Method page.
Log in or sign up for Devpost to join the conversation.