Skip to content

DIVAKAR92/Tennis_Match_Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Tennis_Match_Simulation

We are interested in predicting tennis matches. While there are several approaches to do this, we want to take a point-by-point approach. Assume that a player's serve is iid. Let $p_{s1}$ be the probability that a player 1 will win a point on his serve and $p_{s2}$ the probability that player 2 will win a point on his serve. If one player wins a point, the other player has to lose a point so the probability of winning a return for player 1 is just $p_{r1} = 1 - p_{s2}$. We can therefore forget about return probabilities. While we can work out the probability of winning a match with recursive equation and a bit of combinatorics, we want to simulate this instead. We will that all sets at 6 games each end in tiebreaks and we play best of 3 sets. The rules here : https://en.wikipedia.org/wiki/Tennis_scoring_system

  1. We write an algorithm to simulate the probability of winning the match for probabilities $p_{s1}$ and $p_{s2}$. We use an integer for player and just let '1' designate player 1 and '2' player 2. Finally we have a function that prints the score in the format 40-15 | 6:3 6:7 3:3, i.e. for games in progress and tiebreaks, lists the player serving first. For sets ( whether in progress or completed), list player 1 first and then player 2.

  2. We find the probabilities of winning the match with $p_{s1} = 0.64$ and $p_{s2} = 0.62$ and find the confidence interval.

  3. Let's expand the simulation. Assume the probability of winning the point changes on 'big points'. A 'big point' is defined as a point that can win you a game or set (so includes set points in tie breaks). So we add the probabilities $p_{s1, B}$ and $p_{s2, B}$ as the probability that a player will win his point on serve on big point. Otherwise the probabilities remain $p_{s1}$ and $p_{s2}$.

About

This code simulates the outcome of a tennis match if the probabilities of winning a point for two players are given

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published