The Open Championship 2019 - 1st Rd: What will be Tiger Woods’ COMBINED SCORE on Holes 13-15?
1:22 PM
10 Strokes or Fewer
11 Strokes or More
Inputs To Solve
Royal Portrush Golf Club Course Stats
##### User Estimates #####
hole_13 = {'1':1,
'2':9,
'3':43,
'4':6}
hole_14 = {'3':5,
'4':27,
'5':18,
'6':1}
hole_15 = {'3':6,
'4':29,
'5':11,
'6':2}
print("The observed distribution of scores on hole 13 is: %s" % hole_13)
print("The observed distribution of scores on hole 14 is: %s" % hole_14)
print("The observed distribution of scores on hole 15 is: %s" % hole_15)
The observed distribution of scores on hole 13 is: {‘1’: 1, ‘2’: 9, ‘3’: 43, ‘4’: 6}
The observed distribution of scores on hole 14 is: {‘3’: 5, ‘4’: 27, ‘5’: 18, ‘6’: 1}
The observed distribution of scores on hole 15 is: {‘3’: 6, ‘4’: 29, ‘5’: 11, ‘6’: 2}
## Inputs Defined in the Problem
strokes = 10
golfers = ['Woods13','Woods14','Woods15']
Method to Solve
- Enumrate all the possible combinations of observed scores and their respective probabilities on the 3 holes.
- The probability that 10 Strokes or Fewer are recorded by Tiger Woods on holes 13-15 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_13.values())
for i in hole_13:
hole_13[i] = hole_13[i]/t
t=sum(hole_14.values())
for i in hole_14:
hole_14[i] = hole_14[i]/t
t=sum(hole_15.values())
for i in hole_15:
hole_15[i] = hole_15[i]/t
y = np.array([(w,x,z) for w in hole_13.keys() for x in hole_14.keys() for z in hole_15.keys()])
scores = pd.DataFrame(y)
scores.columns = golfers
scores = scores.convert_objects(convert_numeric=True)
scores['total_strokes'] = scores.sum(axis=1)
z = np.array([(w,x,y) for w in hole_13.values() for x in hole_14.values() for y in hole_15.values()])
probability = pd.DataFrame(z)
probability.columns = golfers
probability['p'] = probability.product(axis=1)
scores.head()
Woods13 | Woods14 | Woods15 | total_strokes | |
---|---|---|---|---|
0 | 1 | 3 | 3 | 7 |
1 | 1 | 3 | 4 | 8 |
2 | 1 | 3 | 5 | 9 |
3 | 1 | 3 | 6 | 10 |
4 | 1 | 4 | 3 | 8 |
probability.head()
Woods13 | Woods14 | Woods15 | p | |
---|---|---|---|---|
0 | 0.016949 | 0.098039 | 0.125000 | 0.000208 |
1 | 0.016949 | 0.098039 | 0.604167 | 0.001004 |
2 | 0.016949 | 0.098039 | 0.229167 | 0.000381 |
3 | 0.016949 | 0.098039 | 0.041667 | 0.000069 |
4 | 0.016949 | 0.529412 | 0.125000 | 0.001122 |
p = 0
for stroke in range(1,strokes+1):
p += probability['p'][scores['total_strokes']==stroke].sum()
Solution
print("The probability that Tiger Woods' COMBINED SCORE on Holes 13-15 is 10 Strokes or Fewer is ~%s" % round(p,3))
The probability that Tiger Woods’ COMBINED SCORE on Holes 13-15 is 10 Strokes or Fewer is ~0.196
Posted on 7/18/2019