Women’s US Open - 2nd Rd (#3 K. Pliskova v. T. Martincova): How many BREAK POINTS will Pliskova FACE in the 2nd Set?
Inputs Needed To Solve
Service Games Won %
Pliskova
Martincova
##### User Estimates #####
KP_SRV_Wperct = .806
KN_SRV_Wperct = .735
KP_BreakPoint = .35
TM_BreakPoint = .65
Method To Solve
- [1] Simulate 9999 Sets between Pliskova and Martincova using respective Service Games Won Percent and the observable odds that any of their service games will go to a BREAK POINT.
- [2] The ratio of Simulated Matches there are 0 or 1 BREAK POINTS to the total number of Simulations is an estimate of the probability of the event happening (p_breakpoint) based on the Monte Carlo Method.
## [1]
import numpy as np
def sim_game(server,perct1,perct2):
if server:
serve = np.random.choice([1,0],1,p=[perct1,1-perct1])
if serve == 1:
ans = '1'
else:
ans = '0'
else:
serve = np.random.choice([1,0],1,p=[perct2,1-perct2])
if serve == 1:
ans = '0'
else:
ans = '1'
return ans
def set_over(winner):
set_over = False
if winner.count('1') >= 7:
set_over = True
if winner.count('0') >= 7:
set_over = True
if winner.count('1') >=6 and winner.count('0') < 5:
set_over = True
if winner.count('0') >=6 and winner.count('1') < 5:
set_over = True
if winner.count('0') == 6 and winner.count('1') == 6:
set_over = True
return set_over
## [2]
iterations = 999
BreakPoints = 0
print("The first 10 simuations yield the following number of BREAK POINTS FACED by Pliskova in the 2nd Set:")
print('')
for i in range(iterations):
winner = ''
server = True
set_over_ = False
bp = 0
while not set_over_:
game = sim_game(server,KP_BreakPoint,TM_BreakPoint)
winner += str(game)
if server:
b_point = int(np.random.choice([1,0],1,p=[KP_BreakPoint,1-KP_BreakPoint]))
bp += b_point
server = not server
set_over_ = set_over(winner)
if bp == 0 or bp == 1:
BreakPoints += 1
if i < 10:
print(bp)
p_breakpoint = BreakPoints/iterations
The first 10 simuations yield the following number of BREAK POINTS FACED by Pliskova in the 2nd Set:
2
4
2
2
2
0
4
8
0
3
Solution
print("The probability Pliskova FACES 0 or 1 BREAK POINTS in the 2nd Set is ~ %s" % round(p_breakpoint,3))
The probability Pliskova FACES 0 or 1 BREAK POINTS in the 2nd Set is ~ 0.172
Info
download md file
email: krellabsinc@gmail.com
twitter: @KRELLabs
import sys
print(sys.version)
3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]
Posted on 8/28/2019