# Modelling approach - tennis match predictions

I am working with a dataset about a fictitious type of sport which is fairly similar to tennis: One has to win 5 points to win a game, 4 games to win a set and 3 sets to win the match. However, there is no advantage to be gained by serving or similar effects. I am also given a list of players together with their age, height, weight and whether they are left or right handed. Furthermore, I am given a large data set which contains for every match played between two of those players the exact sequence of points, games, sets and matches won.

Using the data I want to compute the probability of a certain player winning the next point, the next game, the next set and the match. To do so I plan to make use of the hierarchical structure of the game, i.e. it suffices to compute the probability of a point being won in order to compute the other probabilities.

When predicting the probability of a player winning a point, I want to use the following features:

• Player characteristics: Age, weight, height, hand
• Score: I assume the probability of a player winning the next point is dependent on the current score. By doing so I want to incorporate momentum and the fact that players may perform differently in different sets. I plan to model the features as follows: $$(p1_{points},p2_{points},p1_{games},p2_{games},p1_{sets},p2_{sets})$$ where $$p1_{games}$$ and $$p2_{games}$$ give the number of games won in the current set by players 1 and 2, respectively, and $$p1_{points}$$ and $$p2_{points}$$ the number of points won in the current game.
• Past statistics: I also plan to incorporate past performance of the players. That is, if players A and B play against each other I want to use data of their past encounters as well as performance against common opponents (which seems to be a standard approach in tennis modelling).

Now, lets say I use logistic regression to do the modelling. I then use $$\mathbb{P}(Y=1\vert x) = \frac{1}{1-\exp(-\beta^Tx)}$$

where $$Y$$ is the Bernoulli random variable indicating whether player A wins the next point or not and $$x$$ is the vector containing all the above features. I then loop over all the single points played in every match in my data (possible as I have detailed in-game data) when I optmize the loss function. The problem now is the following: In the first points of my data I do not have any past statistics to put in as the features. Only later in my dataset when I have reliable estimates of those statistics and can really use those features.

My question is how to resolve that issue. I thought of using the statistics over the whole dataset but that would undermine the fact that at prior times a player might have had worse or better stats than over the whole history. That is, at a certain point in time, the past statistics should be computed using this point in time as the reference point in order to avoid look-ahead bias. Another idea to circumvent the problem is to use a fixed fraction of the dataset (say the first p%) to first get reliable estimates and then use the rest of the data to compute the beta. This ensures that even the first points in the data set used for training have reliable stats of past matches.

• Have you considered looking at the Elo system in chess? Have you also considered a weak prior based on the prior period's system's average and variance? – Dave Harris Feb 2 at 17:31

Given the sports-nature of your problem, I would not use the entire history of performances of a player to predict the next performance, because usually in sports last performances ("last" a number which you should somehow work out) make a better description of how well a player is doing today. In this case you can fix a number N of previous matches to take into account and just skip the first N cases for training (you start at N+1 using the last N matches), this should not cause any trouble as long as you have a sufficiently large dataset.

Another option is instead of considering only N previous matches, use the whole dataset, but using some weights to give more importance to recent matches. This means that you should make one or more features holding the information about the match (the simplest being just 1 for win 0 for lose or something similar, depending on how you arrange your data), but this features should be multiplied by reverse-time-decaying weights (coefficients that are smaller for older times).

• Thanks for your reponse. However there are still some questions unanswered: 1. I want to predict the probability of winning a single point and then use this probability to compute the probability of winning a game, set and finally the match. Would you then just consider the last N POINTS? 2. Players could have played against players of different strength, e.g. one player might have played against the stronger opponents which might be the sole reason he lost more often. Should I consider only common opponents? – lbf_1994 Feb 2 at 17:09
• Another huge problem, that comes up with this approach is that many training points are essentially the same: During a match, all the historical data as well as the player characteristics stays the same. The only feature that changes is the current score. Is that a problem? – lbf_1994 Feb 2 at 17:30
• Regarding the 2 questions you asked in your first comment, there is no unique answer, they imply decisions that may be left up to the designer of the predictor. For example, you may take into account N previous matches as well as M previous points from the current game, and get some good values for M and N from the dataset (consider them hyperparameters). For the 2nd question you may only consider just commen oponents, this will simplify the design (which is something valuable) but you will ignore some potentially useful information in turn. – Javi Feb 2 at 17:43
• As for your second comment, in principle that should not harm the predictor if it is well-trained, but it may have an impact on the processing. Maybe you can come up with a way of using the information of previous matches without needing to feed the predictor with those constant features over and over again. On the other hand, I guess that the results of previous matches are important to predict the result of the current match, but I doubt how important they are to predict the result of the current point. But those things are decisions you should make after exploring your data set – Javi Feb 2 at 17:54