Saturday, December 30, 2017

A little math on Badminton


If you had read my first few posts, you would've known that am an amateur Badminton player. Now I don't find either the time or the energy to play the game, but it's a game that I've always enjoyed playing. This post is about combining my interest on Badminton and my passion for math.

Most of the important details of the post are borrowed from Score probabilities for serve and rally competitions. The paper was too good in analyzing a given serve-rally competition, be it tennis or Badminton or the likes, the paper did not stick to any one particular game and finish it off in style which is exactly what we plan to do here for Badminton.

Let's just list the rules to make sure we are all on the same page.

  • A rally cannot end in a draw
  • The winner of the current rally wins a point and serves next irrespective of who served the current rally
  • The first player to reach 21 points wins the game unless the score was ever tied at 20 apiece
  • If the score ever reached 20-20, then the first player to lead by two point or the reach 30 points wins the game

Let me stick to the notations used in the paper quoted above and call the two players $A$ and $B$. WLOG, we always consider $A$ to serve first. The game will be analyzed from $A$'s perspective and hence let $p_a$ denote the probability that $A$ wins the rally when $A$ serves and $p_b$ denote the probability that $A$ wins the rally when $B$ serves.

Then $q_x=1-p_x,\text{ }x=a,b$ be the corresponding winning probabilities for $B$.

Given these probabilities, we intend to find the probability of $A$ winning the game. But before we begin, assuming both the players are equally skilled, do you think that $A$ has an advantage because he is serving first?

Let $\mathbb{P}(X),\text{ } X=A,B$ denote the probability that $X$ wins the game and $\mathbb{P}(X_{i,j}),\text{ } X=A,B$ denote the probability that game is at a stage where $A$ has $i$ points, $B$ has $j$ points and $X$ has won the last point.

The paper doesn't go on to complete by taking into account the end conditions of the game. To do that, we extend it to cover the end cases as well.

$\mathbb{P}(A_{i,j})=
\begin{cases}
0,& i \leq 0\\
p_a^i, &i\leq21,j=0\\
\displaystyle p_a^iq_b^j\sum_{r=1}^i\binom{i}{r}\binom{j-1}{r-1}\left(\frac{q_a p_b}{p_a q_b}\right)^r,&i < 21, j<21\text{ (or) }i=21,j<20\\
p_a\text{ }\mathbb{P}(A_{i-1,j})+p_b\text{ }\mathbb{P}(B_{i-1,j}),&0\leq i - j \leq 2, \text{ }i\leq30,j<30
\end{cases}$

$\mathbb{P}(B_{i,j})=
\begin{cases}
0,& j \leq 0\\
q_a q_b^{j-1}, &j\leq21,i=0\\
q_a q_b^{j-1}p_a^i\left[1+\displaystyle\sum_{s=1}^{j-1}\sum_{r=1}^i\binom{i}{r}\binom{s-1}{r-1}\left(\frac{q_a p_b}{p_a q_b}\right)^r\right],&j < 21, i<21\text{ (or) }j=21,i<20\\
q_a\text{ }\mathbb{P}(A_{i,j-1})+q_b\text{ }\mathbb{P}(B_{i,j-1}),&0\leq j-i \leq 2, \text{ }j\leq30,i<30
\end{cases}$

Anything that doesn't fall in these categories is $0$.

Now,

$\mathbb{P}(A)=\displaystyle\sum_{r=0}^{19} \mathbb{P}(A_{21,r})+\sum_{r=22}^{30} \mathbb{P}(A_{r,r-2})+\mathbb{P}(A_{30,29})$ and $\mathbb{P}(B)=1-\mathbb{P}(A)$

Playing with this code, we now answer the question that I asked above. According to the model, when both the players are equally skilled (both while serving and defending), it makes no difference as to who serves first. This seemed a counter-intuitive to me because assuming everything else equal, I thought the first player has the initiative.

Let's look at the question of serve-advantage with the following graphic.



The probability of $A$ winning the game is plotted in the Y-axes. The orange curve is when both players are equally adept at winning the rallies when they serve. That 'adept-ness' is in the X-axis. The upper blue curve is when $A$ has a 'slight' serve-advantage over $B$ and vice verse for the lower green curve. (The 'slight' is 1% here)

The green curve clearly shows the second player can 'pull-down' $A$'s chances of winning the game by developing a serve-advantage though at professional levels this diminishes fast.

Yet another interesting graphic is the one where the first player has the same probability of winning a rally irrespective of who served.


Again the Y-axis shows the probability of $A$ winning the game and the X-axis, his probability of winning the rally (irrespective of the serve). The graph pretty much says that once a player reached about 2/3rd chance of winning the rally, there is pretty much nothing more he has (or need) to do.

Hope you enjoyed this. Wish you all a very Happy New Year!!



Yours Aye,
Me

1 comment:

  1. Omg you have gone mad! I really never thought of that. When i play badminton i hope i have a net too. Where do you get these all from and how do you deal with those scary equations?

    ReplyDelete