U.S. Open - 1st Rd: Will Brooks Koepka record BACK-TO-BACK BIRDIES at ANY POINT during Holes 4-9?
Yes: Koepka back-to-back birdies during that stretch
No: Koepka no back-to-back birdies during that stretch
Inputs To Solve
Pebble Beach Golf Links Course Stats
##### User Estimates #####
bird_4 = 76/231
bird_5 = 23/231
bird_6 = 116/231
bird_7 = 51/231
bird_8 = 25/231
bird_9 = 18/231
print("The probability of recording a BIRDIE on hole 4 is %s" % round(bird_4,3))
print("The probability of recording a BIRDIE on hole 5 is %s" % round(bird_5,3))
print("The probability of recording a BIRDIE on hole 6 is %s" % round(bird_6,3))
print("The probability of recording a BIRDIE on hole 7 is %s" % round(bird_7,3))
print("The probability of recording a BIRDIE on hole 8 is %s" % round(bird_8,3))
print("The probability of recording a BIRDIE on hole 9 is %s" % round(bird_9,3))
The probability of recording a BIRDIE on hole 4 is 0.329
The probability of recording a BIRDIE on hole 5 is 0.1
The probability of recording a BIRDIE on hole 6 is 0.502
The probability of recording a BIRDIE on hole 7 is 0.221
The probability of recording a BIRDIE on hole 8 is 0.108
The probability of recording a BIRDIE on hole 9 is 0.078
Method to Solve
- Compute all the possible instances of birdie / no birdie for holes 4-9 (2^6 possible outcomes) and their respective probabilities.
- The probability that Brooks Koepka records BACK-TO-BACK BIRDIES is the sum of all the probabilities of the instances where BACK-TO-BACK BIRDIES are observed.
import numpy as np
import pandas as pd
hole4 = (bird_4,1-bird_4)
hole5 = (bird_5,1-bird_5)
hole6 = (bird_6,1-bird_6)
hole7 = (bird_7,1-bird_7)
hole8 = (bird_8,1-bird_8)
hole9 = (bird_9,1-bird_9)
bird = ('B','N')
y = np.array([(u,v,w,x,y,z) for u in bird for v in bird for w in bird for x in bird for y in bird for z in bird])
scores = pd.DataFrame(y)
scores.columns = ['hole4','hole5','hole6','hole7','hole8','hole9']
scores['sequence'] = scores.sum(axis=1)
scores['b2b'] = scores['sequence'].str.contains('BB')
x = np.array([(u,v,w,x,y,z) for u in hole4 for v in hole5 for w in hole6 for x in hole7 for y in hole8 for z in hole9])
probability = pd.DataFrame(x)
probability.columns = ['hole4','hole5','hole6','hole7','hole8','hole9']
probability['p'] = probability.product(axis=1)
scores.head()
hole4 | hole5 | hole6 | hole7 | hole8 | hole9 | sequence | b2b | |
---|---|---|---|---|---|---|---|---|
0 | B | B | B | B | B | B | BBBBBB | True |
1 | B | B | B | B | B | N | BBBBBN | True |
2 | B | B | B | B | N | B | BBBBNB | True |
3 | B | B | B | B | N | N | BBBBNN | True |
4 | B | B | B | N | B | B | BBBNBB | True |
probability.head()
hole4 | hole5 | hole6 | hole7 | hole8 | hole9 | p | |
---|---|---|---|---|---|---|---|
0 | 0.329004 | 0.099567 | 0.502165 | 0.220779 | 0.108225 | 0.077922 | 0.000031 |
1 | 0.329004 | 0.099567 | 0.502165 | 0.220779 | 0.108225 | 0.922078 | 0.000362 |
2 | 0.329004 | 0.099567 | 0.502165 | 0.220779 | 0.891775 | 0.077922 | 0.000252 |
3 | 0.329004 | 0.099567 | 0.502165 | 0.220779 | 0.891775 | 0.922078 | 0.002986 |
4 | 0.329004 | 0.099567 | 0.502165 | 0.779221 | 0.108225 | 0.077922 | 0.000108 |
p = probability['p'][scores['b2b']==True].sum()
Solution
print("The proability that Brooks Koepka records BACK-TO-BACK BIRDIES at ANY POINT during Holes 4-9is ~%s" % round(p,3))
print("The proability of no BACK-TO-BACK BIRDIES during that stretch is ~%s" % round((1-p),3))
The proability that Brooks Koepka records BACK-TO-BACK BIRDIES at ANY POINT during Holes 4-9 is ~0.184
The proability of no BACK-TO-BACK BIRDIES during that stretch is ~0.816