PGA BMW Championship - 2nd Rd (Medinah, IL): What will be Tiger Woods’ SCORE on Holes 1-3?
10:37AM
10 Strokes or Fewer
11 Strokes or More
Inputs To Solve
Medinah Country Club Course Stats
##### User Estimates #####
hole_1 = {'3':45,
'4':39,
'5':6}
hole_2 = {'2':12,
'3':55,
'4':2}
hole_3 = {'3':14,
'4':51,
'5':4}
## Inputs Defined in the Problem
strokes = 10
holes = ['TW1','TW2','TW3']
Method to Solve
- [1] Enumerate all the possible combinations of observed scores and their respective probabilities for Tiger Woods on the holes 1-3.
- [2] The probability that Tiger Wood’s score is 10 strokes or less is the sum of the probabilities of outcomes where his total score is 10 or less (p_under10).
## [1]
import numpy as np
import pandas as pd
t=sum(hole_1.values())
for i in hole_1:
hole_1[i] = hole_1[i]/t
t=sum(hole_2.values())
for i in hole_2:
hole_2[i] = hole_2[i]/t
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_1.keys()for b in hole_2.keys() for c in hole_3.keys()])
y = y.astype(int)
scores = pd.DataFrame(y)
scores.columns = holes
scores['total_strokes'] = scores.sum(axis=1)
scores.head()
TW1 | TW2 | TW3 | total_strokes | |
---|---|---|---|---|
0 | 3 | 2 | 3 | 8 |
1 | 3 | 2 | 4 | 9 |
2 | 3 | 2 | 5 | 10 |
3 | 3 | 3 | 3 | 9 |
4 | 3 | 3 | 4 | 10 |
z = np.array([(a,b,c) for a in hole_1.values() for b in hole_2.values() for c in hole_3.values()])
probability = pd.DataFrame(z)
probability.columns = holes
probability['p'] = probability.product(axis=1)
probability.head()
TW1 | TW2 | TW3 | p | |
---|---|---|---|---|
0 | 0.5 | 0.173913 | 0.202899 | 0.017643 |
1 | 0.5 | 0.173913 | 0.739130 | 0.064272 |
2 | 0.5 | 0.173913 | 0.057971 | 0.005041 |
3 | 0.5 | 0.797101 | 0.202899 | 0.080865 |
4 | 0.5 | 0.797101 | 0.739130 | 0.294581 |
## [2]
p_under10 = probability['p'][scores['total_strokes']<=strokes].sum()
Solution
print("The probability Tiger Wood's combined score on holes 1-3 is 10 Strokes or Fewer is ~%s" % round(p_under10,3))
The probability Tiger Wood's combined score on holes 1-3 is 10 Strokes or Fewer is ~0.609
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/16/2019