{"id":689,"date":"2016-07-02T11:08:25","date_gmt":"2016-07-02T16:08:25","guid":{"rendered":"http:\/\/www.laurentlessard.com\/bookproofs\/?p=689"},"modified":"2016-07-03T23:28:54","modified_gmt":"2016-07-04T04:28:54","slug":"how-to-beat-roger-federer-at-wimbledon","status":"publish","type":"post","link":"https:\/\/laurentlessard.com\/bookproofs\/how-to-beat-roger-federer-at-wimbledon\/","title":{"rendered":"How to beat Roger Federer at Wimbledon"},"content":{"rendered":"<p>This <a href=\"http:\/\/fivethirtyeight.com\/features\/can-you-figure-out-how-to-beat-roger-federer-at-wimbledon\/\">Riddler problem<\/a> is about the game of tennis! <\/p>\n<blockquote><p>Your wish has been granted, and you get to play tennis against Roger Federer in his prime in the Wimbledon final. You have only a 1 percent chance to win each point, but Roger, sporting gentleman that he is, offers to let you name any score and begin the match at that point. (So, if you\u2019ve entertained a fantasy of storming back after being down three match points in the fifth set, now\u2019s the time to live it.) What score can you name that gives you the best chance to win, and what is your chance of winning the title?<\/p><\/blockquote>\n<p>A rough (and approximate) solution:<br \/>\n<a href=\"javascript:Solution('soln_wimbledon','toggle_wimbledon')\" id=\"toggle_wimbledon\">[Show Solution]<\/a><\/p>\n<div id=\"soln_wimbledon\" style=\"display: none\">\n<p>Here is the rundown of how tennis is scored:<\/p>\n<ul>\n<li> A <strong>match<\/strong> is won by the first player to win three sets. Therefore up to five sets will be played. The first four sets are ordinary sets while the fifth set (if necessary) is an <em>advantage set<\/em>.<\/li>\n<li> An <strong>ordinary set<\/strong> is won by the first player to (i) win six ordinary games and (ii) have a two game lead. If the score ever gets to 6-6, then a special <em>tiebreak game<\/em> is played, and the winner of that game wins the set.<\/li>\n<li> An <strong>advantage set<\/strong> is like an ordinary set, but with no tiebreak. There is no limit on the number of games needed.<\/li>\n<li> An <strong>ordinary game<\/strong> is won by the first player to (i) win four points and (ii) have a two point lead. No limit on the number of points needed.<\/li>\n<li> A <strong>tiebreak game<\/strong> is won by the first player to (i) win seven points and (ii) have a two point lead. No limit on the number of points needed.<\/li>\n<\/ul>\n<p>It may seem at first glance that the most advantageous score is to be up 2 sets to 0, to be winning the third set 5 games to 0, and to be winning the sixth game of that set 40-love (3 points to 0). If we&#8217;re going to beat Roger, it will most likely happen during that 40-love game. If Roger gets past this, he&#8217;ll almost certainly win the rest of the match. There are many ways Roger could win the 40-love game. He could win 5 point in a row (probability $(0.99)^5 \\approx 0.951$). Or he could win three in a row, lose one of the next two games, then win two in a row (probability $2(0.01)(0.99)^6 \\approx 0.019$), and so on. All other possibilities are increasingly unlikely so let&#8217;s stop here and call it roughly $0.970$. So we have roughly a 3% chance of beating Roger if we start with this score.<\/p>\n<p>This is not the best starting score, however! As mentioned above, tiebreak games are played to seven points instead of four! So the most advantageous score is actually to be up 2 sets to 0, to have the third set tied 6 games to 6, and to be winning the tiebreak game 6-0. Then, using an argument similar to the one above, we can approximate Roger&#8217;s chances of winning as $(0.99)^8( 1 + 2(0.01)(0.99) ) \\approx 0.941$.<\/p>\n<p><strong>We have roughly a 5.9% chance of beating Roger.<\/strong><\/p>\n<\/div>\n<p>A more detailed (and exact) solution:<br \/>\n<a href=\"javascript:Solution('soln_wimbledon2','toggle_wimbledon2')\" id=\"toggle_wimbledon2\">[Show Solution]<\/a><\/p>\n<div id=\"soln_wimbledon2\" style=\"display: none\">\n<h3>The fair case<\/h3>\n<p>We&#8217;ll start by calculating what happens in the fair case (where Federer doesn&#8217;t give you a head start). Let&#8217;s step aside from tennis for a second and imagine a generic game where a sequence of rounds is played. Each round, a point is awarded either to me with probability $q$, or to my opponent otherwise. We will play until one of us gets $m$ points and wins by two. In the event that we tie at $m-1$ points each, then we flip a weighted coin to break the tie. In such a coin flip, I win with probability $r$. Let $f_m(q,r)$ be the probability that I win this game.<\/p>\n<p>The probability that I win with a score of $m$ to $k$ is given by ${m+k-1 \\choose k} q^m (1-q)^k$, since I must win the final game and my opponent will win $k$ of the remaining $m+k-1$ games. The tie occurs with probability ${2m-2 \\choose m-1} q^{m-1}(1-q)^{m-1}$ and in this case I win with probability $r$. So we have:<\/p>\n<p>\\[<br \/>\nf_m(q,r) = \\sum_{k=0}^{m-2} {m+k-1 \\choose k} q^m (1-q)^k + {2m-2 \\choose m-1} q^{m-1}(1-q)^{m-1}r<br \/>\n\\]<\/p>\n<p>The first case of interest is when the game is tied (deuce), and we will play until one player wins by two. Let&#8217;s call $x_d,x_f,x_m$ the probability of winning given that the current score is &#8220;deuce&#8221;, &#8220;advantage Federer&#8221;, or &#8220;advantage me&#8221;, respectively. Also, suppose that the probability that I win one point is $p$. Then we can write the following sets of equations:<\/p>\n<p>\\begin{align}<br \/>\nx_d &#038;= p x_m + (1-p) x_f \\\\<br \/>\nx_f &#038;= p x_d \\\\<br \/>\nx_m &#038;= p + (1-p) x_d<br \/>\n\\end{align}<\/p>\n<p>Therefore, the probability that I win a game if the score is deuce is:<\/p>\n<p>\\[<br \/>\nx_d(p) = \\frac{p^2}{1-2p+2p^2}<br \/>\n\\]<\/p>\n<p>We can now build up the entire match one piece at a time.<\/p>\n<ol>\n<li> Each ordinary game is won at 4 points, win by 2, and if we tie at 3-3 then we are at deuce. So my probability of winning a game is:\n<p>\\[<br \/>\ng = f_4(p,x_d(p))<br \/>\n\\]<\/p>\n<li> Each tiebreak game is won at 7 points, win by 2, and if we tie at 6-6 then we are at deuce. So my probability of winning a tiebreak game is:\n<p>\\[<br \/>\n\\bar g = f_7(p,x_d(p))<br \/>\n\\]<\/p>\n<li> Each ordinary set is won at 6 games, win by 2, and if we tie at 5-5, we play two more games. I can win by winning both extra games or by winning one of the two games and then winning a tiebreak game. So if we tie at 5-5, my chance of winning is $g^2 + 2g(1-g)\\bar g$. So my overall chance of winning an ordinary set is:\n<p>\\[<br \/>\ns = f_6(g, g^2 + 2g(1-g)\\bar g)<br \/>\n\\]<\/p>\n<li> Each advantage set is won at 6 games, win by 2, and if we tie 6-6 then we are at deuce. So my probability of winning an advantage set is:\n<p>\\[<br \/>\n\\bar s = f_6( g, x_d(g) )<br \/>\n\\]<\/p>\n<li> The match is won at 3 sets, win by 2, and if we tie at 2-2 then we play an advantage set. So my probability of winning a match is:\n<p>\\[<br \/>\nM = f_3( s, \\bar s)<br \/>\n\\]<\/p>\n<p>While it&#8217;s possible to actually calculate these quantities, the result is pretty messy. For those interested, $M(p)$ is a rational function whose numerator has degree 465 and denominator has degree 136. Yuck! So I won&#8217;t write it out&#8230; but here is what the functions look like as plots:<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_winning.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_winning-1024x635.png\" alt=\"wimbledon_winning\" width=\"840\" height=\"521\" class=\"aligncenter size-large wp-image-713\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_winning-1024x635.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_winning-300x186.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_winning-768x476.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_winning-1200x744.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>I didn&#8217;t include advantage sets on the plot because they have virtually the same distribution as ordinary sets. As expected, the picture is perfectly symmetric; if we have a 50% chance of winning every point, then we have a 50% chance of winning every game, every set, and the entire match. The shape also makes sense; if we are worse than our opponent, then winning a game or a set or a match becomes progressively less likely.<\/p>\n<p>Here are some exact numbers for those who are interested:<\/p>\n<table style=\"width:100%;\">\n<tr>\n<td><b>P(win point)<\/b><\/td>\n<td><b>P(win game)<\/b><\/td>\n<td><b>P(win set)<\/b><\/td>\n<td><b>P(win match)<\/b><\/td>\n<\/tr>\n<tr>\n<td>49%<\/td>\n<td>47.5%<\/td>\n<td>42.9%<\/td>\n<td>36.8%<\/td>\n<\/tr>\n<tr>\n<td>45%<\/td>\n<td>37.7%<\/td>\n<td>18.5%<\/td>\n<td>4.61%<\/td>\n<\/tr>\n<tr>\n<td>40%<\/td>\n<td>26.4%<\/td>\n<td>3.65%<\/td>\n<td>0.04%<\/td>\n<\/tr>\n<tr>\n<td>1%<\/td>\n<td>1.50&times;10<sup>-7<\/sup><\/td>\n<td>2.35&times;10<sup>-39<\/sup><\/td>\n<td>1.30&times;10<sup>-115<\/sup><\/td>\n<\/tr>\n<\/table>\n<p>So if your chance of winning one point is 1%, your chance of beating Federer is roughly the same as your odds of winning the Mega-Million jackpot 14 times in a row. Not good.<\/p>\n<h3>The unfair case<\/h3>\n<p>As discussed before, we&#8217;ll want to start with a 2-0 set lead in the match. The third set will be tied 6-6 and we&#8217;ll be up 6-0 in the tiebreak game.<br \/>\nTo find our chance of winning in this case, we will instead calculate our chance of losing, because the algebra is simpler. We need to calculate:<\/p>\n<p>\\begin{align}<br \/>\n&#038;\\mathbb{P}(\\text{lose match})\\\\<br \/>\n&#038;= \\mathbb{P}(\\text{lose tiebreak up 6-0}) \\times \\mathbb{P}(\\text{lose match up 2-1}) \\\\<br \/>\n&#038;= \\mathbb{P}(\\text{lose 6 points}) \\times \\mathbb{P}(\\text{lose deuce}) \\times \\mathbb{P}(\\text{lose 1 set}) \\times \\mathbb{P}(\\text{lose 1 adv. set}) \\\\<br \/>\n&#038;= (1-p)^6(1-x_d(p))(1-s)(1-\\bar s)<br \/>\n\\end{align}<\/p>\n<p>Once again, we can evaluate this quantity algebraically, and it turns out to be a mess&#8230; it&#8217;s a rational function of $p$ whose numerator has degree 182 and whose denominator has degree 60. But there is a trick: we can approximate $s\\approx \\bar s \\approx 0$, i.e. we just give up if we don&#8217;t win that first tiebreak, and we get a much simpler formula:<\/p>\n<p style=\"text-align: center;\"><span style=\"background-color: #AFC8E6; padding: 25px 10px 25px 10px;\">$\\displaystyle<br \/>\n\\mathbb{P}(\\text{win match}) \\approx 1\\, -\\, \\frac{(1-p)^8}{1-2p+2p^2}<br \/>\n$<\/span><\/p>\n<p>To verify that this approximation is a good one, I plotted both the true function and the approximation on the same axes:<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_unfair.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_unfair-1024x635.png\" alt=\"wimbledon_unfair\" width=\"840\" height=\"521\" class=\"aligncenter size-large wp-image-720\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_unfair-1024x635.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_unfair-300x186.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_unfair-768x476.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_unfair-1200x744.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>Here is a plot showing the difference between the curves (on a log scale):<\/p>\n<p><a href=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_err.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_err-1024x633.png\" alt=\"wimbledon_err\" width=\"840\" height=\"519\" class=\"aligncenter size-large wp-image-721\" srcset=\"https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_err-1024x633.png 1024w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_err-300x185.png 300w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_err-768x474.png 768w, https:\/\/laurentlessard.com\/bookproofs\/wp-content\/uploads\/2016\/07\/wimbledon_err-1200x741.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>So if we have $p=0.01$ as specified in the problem, the approximation will be correct to 36 decimal digits! The final numerical result is:<\/p>\n<p style=\"text-align: center;\"><span style=\"background-color: #AFC8E6; padding: 25px 10px 25px 10px;\">$\\displaystyle<br \/>\n\\mathbb{P}(\\text{win match}) = 5.86159\\%<br \/>\n$<\/span><\/p>\n<p>So our original approximation of 5.9% wasn&#8217;t far off.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This Riddler problem is about the game of tennis! Your wish has been granted, and you get to play tennis against Roger Federer in his prime in the Wimbledon final. You have only a 1 percent chance to win each point, but Roger, sporting gentleman that he is, offers to let you name any score &hellip; <a href=\"https:\/\/laurentlessard.com\/bookproofs\/how-to-beat-roger-federer-at-wimbledon\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to beat Roger Federer at Wimbledon&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7],"tags":[8,2],"class_list":["post-689","post","type-post","status-publish","format-standard","hentry","category-riddler","tag-probability","tag-riddler"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/comments?post=689"}],"version-history":[{"count":48,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/689\/revisions"}],"predecessor-version":[{"id":743,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/689\/revisions\/743"}],"wp:attachment":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media?parent=689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/categories?post=689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/tags?post=689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}