PGA BMW Championship - 1st Rd: What will be B. Koepka, R. McIlroy and P. Reed’s COMBINED SCORE on the Par 4 3rd?)
12:20PM
10, 12 or 14 Strokes
Any Other Number
Inputs To Solve
Medinah Country Club Course Stats
##### User Estimates #####
# estimate given the course has not been played at the time of the prop
hole_3 = {'3':45,
'4':254,
'5':89,
'6':7,
'7':2}
## Inputs Defined in the Problem
strokes = [10,12,14]
Method to Solve
- [1] Enumerate all the possible combinations of observed scores and their respective probabilities for 3 golfers on the 3rd hole.
- [3] The probability that B. Koepka, R. McIlroy and P. Reed’s score is 10, 12 or 14 is the sum of the probabilities of outcomes where the 3 golfer’s total score is 10, 12 or 14 (p_10_12_14).
import numpy as np
import pandas as pd
## [1]
t=sum(hole_3.values())
for i in hole_3:
hole_3[i] = hole_3[i]/t
y = np.array([(a,b,c) for a in hole_3.keys()for b in hole_3.keys() for c in hole_3.keys()])
y = y.astype(int)
scores = pd.DataFrame(y)
scores['total_strokes'] = scores.sum(axis=1)
scores.head()
0 | 1 | 2 | total_strokes | |
---|---|---|---|---|
0 | 3 | 3 | 3 | 9 |
1 | 3 | 3 | 4 | 10 |
2 | 3 | 3 | 5 | 11 |
3 | 3 | 3 | 6 | 12 |
4 | 3 | 3 | 7 | 13 |
z = np.array([(a,b,c) for a in hole_3.values() for b in hole_3.values() for c in hole_3.values()])
probability = pd.DataFrame(z)
probability['p'] = probability.product(axis=1)
probability.head()
0 | 1 | 2 | p | |
---|---|---|---|---|
0 | 0.11335 | 0.11335 | 0.113350 | 0.001456 |
1 | 0.11335 | 0.11335 | 0.639798 | 0.008220 |
2 | 0.11335 | 0.11335 | 0.224181 | 0.002880 |
3 | 0.11335 | 0.11335 | 0.017632 | 0.000227 |
4 | 0.11335 | 0.11335 | 0.005038 | 0.000065 |
## [2]
p_10 = probability['p'][scores['total_strokes']==strokes[0]].sum()
p_12 = probability['p'][scores['total_strokes']==strokes[1]].sum()
p_14 = probability['p'][scores['total_strokes']==strokes[2]].sum()
p_10_12_14 = p_10 + p_12 + p_14
Solution
print("The probability B. Koepka, R. McIlroy and P. Reed's's combined score is 10, 12 or 14 is ~%s" % round(p_10_12_14,3))
The probability B. Koepka, R. McIlroy and P. Reed's's combined score is 10, 12 or 14 is ~0.508
Info
download markdown 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/15/2019