PGA Charles Schwab Challenge - 3rd Rd: What will be Brooks Koepka’s SCORE on Holes 7-9?
1:26PM
10 Strokes or Fewer
11 Strokes or More
Inputs to Solve
##### User Estimates #####
hole_7 = {'3':30,
'4':124,
'5':33,
'6':47,
'7':1}
hole_8 = {'2':33,
'3':126,
'4':28,
'5':1}
hole_9 = {'3':38,
'4':117,
'5':23,
'6':5}
print("The observed distribution of scores on hole 7 is: %s" % hole_7)
print("The observed distribution of scores on hole 8 is: %s" % hole_8)
print("The observed distribution of scores on hole 9 is: %s" % hole_9)
The observed distribution of scores on hole 7 is: {‘3’: 30, ‘4’: 124, ‘5’: 33, ‘6’: 47, ‘7’: 1}
The observed distribution of scores on hole 8 is: {‘2’: 33, ‘3’: 126, ‘4’: 28, ‘5’: 1}
The observed distribution of scores on hole 9 is: {‘3’: 38, ‘4’: 117, ‘5’: 23, ‘6’: 5}
## Inputs Defined in the Problem
strokes = 10
golfers = ['Koepka7','Koepka8','Koepka9']
Method to Solve
- [1] Enumrate all the possible combinations of observed scores and their respective probabilities on the 3 holes.
- [2] The probability that 10 Strokes or Fewer (p_under11) are recorded by Brpooks Koepka on holes 7-9 is the sum of the probabilities for all the outcomes where the total number of Strokes is 10 or less.
import numpy as np
import pandas as pd
t=sum(hole_7.values())
for i in hole_7:
hole_7[i] = hole_7[i]/t
t=sum(hole_8.values())
for i in hole_8:
hole_8[i] = hole_8[i]/t
t=sum(hole_9.values())
for i in hole_9:
hole_9[i] = hole_9[i]/t
y = np.array([(w,x,z) for w in hole_7.keys() for x in hole_8.keys() for z in hole_9.keys()])
scores = pd.DataFrame(y)
scores.columns = golfers
scores = scores.apply(pd.to_numeric)
scores['total_strokes'] = scores.sum(axis=1)
z = np.array([(w,x,y) for w in hole_7.values() for x in hole_8.values() for y in hole_9.values()])
probability = pd.DataFrame(z)
probability.columns = golfers
probability['p'] = probability.product(axis=1)
scores
Koepka7 | Koepka8 | Koepka9 | total_strokes | |
---|---|---|---|---|
0 | 3 | 2 | 3 | 8 |
1 | 3 | 2 | 4 | 9 |
2 | 3 | 2 | 5 | 10 |
3 | 3 | 2 | 6 | 11 |
4 | 3 | 3 | 3 | 9 |
… | … | … | … | … |
75 | 7 | 4 | 6 | 17 |
76 | 7 | 5 | 3 | 15 |
77 | 7 | 5 | 4 | 16 |
78 | 7 | 5 | 5 | 17 |
79 | 7 | 5 | 6 | 18 |
80 rows × 4 columns
probability
Koepka7 | Koepka8 | Koepka9 | p | |
---|---|---|---|---|
0 | 0.127660 | 0.175532 | 0.207650 | 4.653096e-03 |
1 | 0.127660 | 0.175532 | 0.639344 | 1.432664e-02 |
2 | 0.127660 | 0.175532 | 0.125683 | 2.816347e-03 |
3 | 0.127660 | 0.175532 | 0.027322 | 6.122494e-04 |
4 | 0.127660 | 0.670213 | 0.207650 | 1.776637e-02 |
… | … | … | … | … |
75 | 0.004255 | 0.148936 | 0.027322 | 1.731615e-05 |
76 | 0.004255 | 0.005319 | 0.207650 | 4.700097e-06 |
77 | 0.004255 | 0.005319 | 0.639344 | 1.447135e-05 |
78 | 0.004255 | 0.005319 | 0.125683 | 2.844795e-06 |
79 | 0.004255 | 0.005319 | 0.027322 | 6.184338e-07 |
80 rows × 4 columns
## [2]
p_under11 = probability['p'][scores['total_strokes']<=strokes].sum()
Solution
print("The probability that Brooks Koepka's SCORE on Holes 7-9 is 10 or Fewer Strokes is ~ %s" % round(p_under11,3))
The probability that Brooks Koepka’s SCORE on Holes 7-9 is 10 or Fewer Strokes is ~ 0.255
Info
download markdown file
email: krellabsinc@gmail.com
twitter: @KRELLabs
import sys
print(sys.version)
3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)]
Posted on 6/13/2020