PGA RBC Heritage - 2nd Rd: Will G. Woodland OR D. Johnson record a BIRDIE during Holes 6-7?
11:05AM
Yes: Either make at least 1 birdie on Holes 6-7
No: Neither make a birdie Holes 6-7
Inputs to Solve
2020 Course Stats
(data used up to start of 2nd round)
##### User Estimates #####
p_bird = [40/154, 14/154]
count = 6
for p in p_bird:
print("The probability that a golfer BIRDIES hole " + str(count) + " is %s" % round(p,3))
count +=1
The probability that a golfer BIRDIES hole 6 is 0.26
The probability that a golfer BIRDIES hole 7 is 0.091
## Inputs Defined in the Problem
total_birdies = 0
Method to Solve
- [1] Enumerate all the possible combinations BIRDIES and NON-BIRDIES for two golfers on holes 6-7 (2^4 combinations).
- [2] The probability that at least one golfer makes a BIRDIE on holes 6-7 (p_BIRD) is 1 - the sum of the probabilities that there are no BIRDIES (p_0) scored by either golfer on holes 6-7.
## [1]
import numpy as np
import pandas as pd
holes = ['6','6','7','7']
outcomes = (1,0)
y = np.array([(a,b,c,d) for a in outcomes for b in outcomes for c in outcomes
for d in outcomes])
birdies = pd.DataFrame(y)
birdies.columns = holes
birdies['total_birdies'] = birdies.sum(axis=1)
x = np.array([(a,b,c,d) for a in (p_bird[0],1-p_bird[0]) for b in (p_bird[0],1-p_bird[0])
for c in (p_bird[1],1-p_bird[1]) for d in (p_bird[1],1-p_bird[1])])
probability = pd.DataFrame(x)
probability.columns = holes
probability['p'] = probability.product(axis=1)
birdies
6 | 6 | 7 | 7 | total_birdies | |
---|---|---|---|---|---|
0 | 1 | 1 | 1 | 1 | 4 |
1 | 1 | 1 | 1 | 0 | 3 |
2 | 1 | 1 | 0 | 1 | 3 |
3 | 1 | 1 | 0 | 0 | 2 |
4 | 1 | 0 | 1 | 1 | 3 |
5 | 1 | 0 | 1 | 0 | 2 |
6 | 1 | 0 | 0 | 1 | 2 |
7 | 1 | 0 | 0 | 0 | 1 |
8 | 0 | 1 | 1 | 1 | 3 |
9 | 0 | 1 | 1 | 0 | 2 |
10 | 0 | 1 | 0 | 1 | 2 |
11 | 0 | 1 | 0 | 0 | 1 |
12 | 0 | 0 | 1 | 1 | 2 |
13 | 0 | 0 | 1 | 0 | 1 |
14 | 0 | 0 | 0 | 1 | 1 |
15 | 0 | 0 | 0 | 0 | 0 |
probability
6 | 6 | 7 | 7 | p | |
---|---|---|---|---|---|
0 | 0.25974 | 0.25974 | 0.090909 | 0.090909 | 0.000558 |
1 | 0.25974 | 0.25974 | 0.090909 | 0.909091 | 0.005576 |
2 | 0.25974 | 0.25974 | 0.909091 | 0.090909 | 0.005576 |
3 | 0.25974 | 0.25974 | 0.909091 | 0.909091 | 0.055756 |
4 | 0.25974 | 0.74026 | 0.090909 | 0.090909 | 0.001589 |
5 | 0.25974 | 0.74026 | 0.090909 | 0.909091 | 0.015891 |
6 | 0.25974 | 0.74026 | 0.909091 | 0.090909 | 0.015891 |
7 | 0.25974 | 0.74026 | 0.909091 | 0.909091 | 0.158905 |
8 | 0.74026 | 0.25974 | 0.090909 | 0.090909 | 0.001589 |
9 | 0.74026 | 0.25974 | 0.090909 | 0.909091 | 0.015891 |
10 | 0.74026 | 0.25974 | 0.909091 | 0.090909 | 0.015891 |
11 | 0.74026 | 0.25974 | 0.909091 | 0.909091 | 0.158905 |
12 | 0.74026 | 0.74026 | 0.090909 | 0.090909 | 0.004529 |
13 | 0.74026 | 0.74026 | 0.090909 | 0.909091 | 0.045288 |
14 | 0.74026 | 0.74026 | 0.909091 | 0.090909 | 0.045288 |
15 | 0.74026 | 0.74026 | 0.909091 | 0.909091 | 0.452880 |
## [2]
p_0 = probability['p'][birdies['total_birdies']==total_birdies].sum()
p_BIRDIE = 1-p_0
Solution
print("The probability that G. Woodland OR D. Johnson record a BIRDIE during Holes 6-7 is ~ %s" % round(p_BIRDIE,3))
The probability that G. Woodland OR D. Johnson record a BIRDIE during Holes 6-7 is ~ 0.547
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/19/2020