# Bonus Maths!!

Welcome to the page of mathematical formulas. Since you have decided to check this page out I will assume you know some maths and get straight to the point. The standard (single probability) formulas describing the probability of winning anything in tennis are given below:

$\textrm{Game}=g=\sum_{i=0}^2\binom{3+i}{3}p^4(1-p)^i+\frac{\binom{6}{3}p^5(1-p)^3}{1-2p(1-p)}$

$\textrm{Tie-Break Game}=t=\sum_{i=0}^5\binom{6+i}{6}p^7(1-p)^i+\frac{\binom{12}{6}p^8(1-p)^6}{1-2p(1-p)}$

$\textrm{Tie-Break Set}=TBs=\sum_{i=0}^4\binom{5+i}{5}g^6(1-g)^i+\binom{10}{5}p^5(1-p)^5\left(g^2+2g(1-g)t\right)$

$\textrm{Advantage Set}=Ads=\sum_{i=0}^4\binom{5+i}{5}g^6(1-g)^i+\frac{\binom{10}{5}p^7(1-p)^5}{1-2g(1-g)}$

$n\textrm{ Set Tie-Break Match}=TBn=\sum_{i=0}^{\frac{n-1}{2}}\binom{\frac{n-1}{2}+i}{\frac{n-1}{2}}TBs^{\frac{n+1}{2}}(1-TBs)^i$

$n\textrm{ Set Advantage Match}=Adn=\sum_{i=0}^{\frac{n-3}{2}}\binom{\frac{n-1}{2}+i}{\frac{n-1}{2}}TBs^{\frac{n+1}{2}}(1-TBs)^i +\binom{n-1}{\frac{n-1}{2}}TBs^{\frac{n-1}{2}}(1-TBs)^{\frac{n-1}{2}}Ads$

Obviously some of these formulas don’t require summations and some of the binomial coefficients can be given explicitly, but I like the general forms and it makes it easy to make a Matlab function for them.

The case of taking into account the two different probabilities complicates matters. For a tie-break game the formula becomes:

$t=qp^3q^3 +p\sum_{i=0}^1\binom{3}{2+i}\binom{4}{4-i}p^{2+i}(1-p)^{1-i}q^{4-i}(1-q)^i +p\sum_{i=0}^2\binom{4}{2+i}\binom{4}{4-i}p^{2+i}(1-p)^{2-i}q^{4-i}(1-q)^i +q\sum_{i=0}^3\binom{5}{2+i}\binom{4}{4-i}p^{2+i}(1-p)^{3-i}q^{4-i}(1-q)^i +q\sum_{i=0}^4\binom{5}{1+i}\binom{5}{5-i}p^{1+i}(1-p)^{4-i}q^{5-i}(1-q)^i +p\sum_{i=0}^5\binom{5}{i}\binom{6}{6-i}p^{i}(1-p)^{5-i}q^{6-i}(1-q)^i +\frac{pq}{1-(p+q-2pq)}\sum_{i=0}^6\binom{6}{i}\binom{6}{6-i}p^{i}(1-p)^{6-i}q^{6-i}(1-q)^i$

This was derived with the notation that if you are serving first (second) in the tie-break, then $p$ is the probability of winning a point on serve (against serve) and $q$ is the probability of winning a point against serve (on serve). While in this form it looks asymmetrical, it can be shown that it is in fact symmetrical in $p$ and $q$, so it does not actually matter which is which.

Winning an advantage set takes a very similar form. It was derived with the notation that if you are serving first (second) in the set the probability of winning a game on serve (against serve) will be labelled $g$ and the probability of winning a game against serve (on serve) will be labelled $h$. Again, as with the final formula, symmetry makes this irrelevant.

$Ads=hg^3h^2 +g\sum_{i=0}^1\binom{3}{2+i}\binom{3}{3-i}g^{2+i}(1-g)^{1-i}h^{3-i}(1-h)^i +h\sum_{i=0}^2\binom{4}{2+i}\binom{3}{3-i}g^{2+i}(1-g)^{2-i}h^{3-i}(1-h)^i +g\sum_{i=0}^3\binom{4}{1+i}\binom{4}{4-i}g^{1+i}(1-g)^{3-i}h^{4-i}(1-h)^i +h\sum_{i=0}^4\binom{5}{1+i}\binom{4}{4-i}g^{1+i}(1-g)^{4-i}h^{4-i}(1-h)^i +\frac{gh}{1-(g+h-2gh)}\sum_{i=0}^5\binom{5}{i}\binom{5}{5-i}g^{i}(1-g)^{5-i}h^{5-i}(1-h)^i$

Lastly, for a tie-break set the formula is:

$TBs=hg^3h^2 +g\sum_{i=0}^1\binom{3}{2+i}\binom{3}{3-i}g^{2+i}(1-g)^{1-i}h^{3-i}(1-h)^i +h\sum_{i=0}^2\binom{4}{2+i}\binom{3}{3-i}g^{2+i}(1-g)^{2-i}h^{3-i}(1-h)^i +g\sum_{i=0}^3\binom{4}{1+i}\binom{4}{4-i}g^{1+i}(1-g)^{3-i}h^{4-i}(1-h)^i +h\sum_{i=0}^4\binom{5}{1+i}\binom{4}{4-i}g^{1+i}(1-g)^{4-i}h^{4-i}(1-h)^i +\left(gh+(g+h-2gh)t\right)\sum_{i=0}^5\binom{5}{i}\binom{5}{5-i}g^{i}(1-g)^{5-i}h^{5-i}(1-h)^i$

I now urge the reader to test out some of these formulas on real players’ statistics and see how they hold up. Even individual match ups between two people may be interesting. Since there may not be much data for a specific match up, break the probability of winning a point up into to sections $p=if+(1-i)js$, $q=if+(1-i)js+(1-i)(1-j)$, where $i$ is the probability of getting a first serve in, $j$ the probability of getting a second serve in (determined by the single player), $f$ is the probability of winning a point if the first serve goes in and $s$ is the probability of winning a point on the second serve (these depend on both players).