The Open Championship 2019 - 1st Rd: How many PARS will J. Rahm, M. Kuchar AND P. Cantlay record on the Par 4 18th?
2:53 PM
2 Pars
Any Other Number
Inputs To Solve
Royal Portrush Golf Club Course Stats
##### User Estimates #####
p_par_18 = 21/(2+21+13+2)
print("The probability of a PLAYER scoring PAR on hole 18 is ~%s" % round(p_par_18,3))
The probability of a PLAYER scoring PAR on hole 18 is ~0.553
## Inputs Defined in the Problem
num_pars = 2
golfers = ['Rahm','Kuchar','Cantlay']
Method to Solve
- Compute the probability of 0, 1 or 2 PARS being scored on hole 18 by the 3 golfers
- The probability that 2 PARS are scored by the three golfers on hole 18 is the sum of the probabilities for all the outcomes where the total number of PARS is equal to 2.
import numpy as np
import pandas as pd
# Hole 18
p_other = 1 - p_par_18
prob = (p_par_18,p_other)
par = (1,0)
a = {}
y = np.array([(w,x,z) for w in par for x in par for z in par])
pars = pd.DataFrame(y)
pars.columns = golfers
pars['total_pars'] = pars.sum(axis=1)
x = np.array([(w,y,z) for w in prob for y in prob for z in prob])
probability = pd.DataFrame(x)
probability.columns = golfers
probability['p'] = probability.product(axis=1)
pars.head()
Rahm | Kuchar | Cantlay | total_pars | |
---|---|---|---|---|
0 | 1 | 1 | 1 | 3 |
1 | 1 | 1 | 0 | 2 |
2 | 1 | 0 | 1 | 2 |
3 | 1 | 0 | 0 | 1 |
4 | 0 | 1 | 1 | 2 |
probability.head()
Rahm | Kuchar | Cantlay | p | |
---|---|---|---|---|
0 | 0.552632 | 0.552632 | 0.552632 | 0.168775 |
1 | 0.552632 | 0.552632 | 0.447368 | 0.136627 |
2 | 0.552632 | 0.447368 | 0.552632 | 0.136627 |
3 | 0.552632 | 0.447368 | 0.447368 | 0.110603 |
4 | 0.447368 | 0.552632 | 0.552632 | 0.136627 |
p = round(probability['p'][pars['total_pars']==num_pars].sum(),3)
Solution
print("The probability that J. Rahm, M. Kuchar AND P. Cantlay record 2 PARS on the PAR 4 18th is ~%s" % p)
The probability that J. Rahm, M. Kuchar AND P. Cantlay record 2 PARS on the PAR 4 18th is ~0.41
Posted on 7/18/2019