Home Archives Search Feed Football Squares How To Use


U.S. Open - 1st Rd: What will be T. Woods, J. Rose and J. Spieth’s COMBINED SCORE on Holes 10-11?


23,24 or 25 Strokes
Any Other Score

Inputs To Solve

Pebble Beach Golf Links Course Stats

##### User Estimates #####

hole_10 = {'3':60,
          '4':158,
          '5':41,
          '6':4,
          '7':3}

hole_11 = {'2':1,
          '3':31,
          '4':150,
          '5':44,
          '6':5}

print("The observed distribution of scores on hole 10 is: %s" % hole_10)
print("The observed distribution of scores on hole 11 is: %s" % hole_11)

The observed distribution of scores on hole 10 is: {‘3’: 60, 4’: 158, 5’: 41, 6’: 4, 7’: 3}
The observed distribution of scores on hole 11 is: {‘2’: 1, 3’: 31, 4’: 150, 5’: 44, 6’: 5}    

## Inputs Defined in the Problem

strokes = [23,24,25]
golfers = ['Woods10','Rose10','Spieth10','Woods11','Rose11','Spieth11']

Method to Solve

import numpy as np
import pandas as pd

t=sum(hole_10.values())
for i in hole_10:
    hole_10[i] = hole_10[i]/t

t=sum(hole_11.values())
for i in hole_11:
    hole_11[i] = hole_11[i]/t

    
y = np.array([(u,v,w,x,y,z) for u in hole_10.keys() for v in hole_10.keys() for w in hole_10.keys() for x in hole_11.keys() for y in hole_11.keys() for z in hole_11.keys()])
scores = pd.DataFrame(y)
scores.columns = golfers
scores = scores.convert_objects(convert_numeric=True)
scores['total_strokes'] = scores.sum(axis=1)

x = np.array([(u,v,w,x,y,z) for u in hole_10.values() for v in hole_10.values() for w in hole_10.values() for x in hole_11.values() for y in hole_11.values() for z in hole_11.values()])
probability = pd.DataFrame(x)
probability.columns = golfers
probability['p'] = probability.product(axis=1)

scores.head()
Woods10 Rose10 Spieth10 Woods11 Rose11 Spieth11 total_strokes
0 3 3 3 2 2 2 15
1 3 3 3 2 2 3 16
2 3 3 3 2 2 4 17
3 3 3 3 2 2 5 18
4 3 3 3 2 2 6 19
probability.head()
Woods10 Rose10 Spieth10 Woods11 Rose11 Spieth11 p
0 0.225564 0.225564 0.225564 0.004329 0.004329 0.004329 9.310498e-10
1 0.225564 0.225564 0.225564 0.004329 0.004329 0.134199 2.886254e-08
2 0.225564 0.225564 0.225564 0.004329 0.004329 0.649351 1.396575e-07
3 0.225564 0.225564 0.225564 0.004329 0.004329 0.190476 4.096619e-08
4 0.225564 0.225564 0.225564 0.004329 0.004329 0.021645 4.655249e-09
p = 0
for stroke in strokes:
    p += probability['p'][scores['total_strokes']==stroke].sum()

Solution

print("The proability that Woods, Rose and Spieth record 23,24 or 25 strokes on holes 10-11 is ~%s" % round(p,3))
print("The proability of any other score is ~%s" % round((1-p),3))

The proability that Woods, Rose and Spieth record 23,24 or 25 strokes on holes 10-11 is ~0.643
The proability of any other score is ~0.357

Posted on 6/13/2019






← Next post    ·    Previous post →