PGA Charles Schwab Challenge - 3rd Rd: Will BOTH X. Schauffele AND R. McIlroy record AT LEAST 1 BIRDIE during Holes 10-13?
4:10PM
Yes: Both birdie during Holes 10-13
No: At least 1 no birdie during Holes 10-13
Inputs to Solve
##### User Estimates #####
p_bird = [45/216, 28/216, 47/216, 38/216]
count = 10
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 10 is 0.208
The probability that a golfer BIRDIES hole 11 is 0.13
The probability that a golfer BIRDIES hole 12 is 0.218
The probability that a golfer BIRDIES hole 13 is 0.176
## Inputs Defined in the Problem
total_birdies = 0
Method to Solve
- [1] Enumerate all the possible combinations BIRDIES and NON-BIRDIES for one golfer on holes 10-13 (2^4 combinations).
- [2] The probability that 0 BIRDIES are scored by one golfer on holes 10-13 is the sum of the probabilities for all the outcomes where the total number of BIRDIES is equal to 0 (p_0).
- [3] The probability that both Schauffele AND McIlroy BIRDIE at least one hole each (p_1BIRDIE) is 1 - the probability that both BIRDIE 0 holes.
## [1]
import numpy as np
import pandas as pd
holes = ['10','11','12','13']
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[1],1-p_bird[1])
for c in (p_bird[2],1-p_bird[2]) for d in (p_bird[3],1-p_bird[3])])
probability = pd.DataFrame(x)
probability.columns = holes
probability['p'] = probability.product(axis=1)
birdies
10 | 11 | 12 | 13 | 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
10 | 11 | 12 | 13 | p | |
---|---|---|---|---|---|
0 | 0.208333 | 0.12963 | 0.217593 | 0.175926 | 0.001034 |
1 | 0.208333 | 0.12963 | 0.217593 | 0.824074 | 0.004843 |
2 | 0.208333 | 0.12963 | 0.782407 | 0.175926 | 0.003717 |
3 | 0.208333 | 0.12963 | 0.782407 | 0.824074 | 0.017413 |
4 | 0.208333 | 0.87037 | 0.217593 | 0.175926 | 0.006941 |
5 | 0.208333 | 0.87037 | 0.217593 | 0.824074 | 0.032514 |
6 | 0.208333 | 0.87037 | 0.782407 | 0.175926 | 0.024959 |
7 | 0.208333 | 0.87037 | 0.782407 | 0.824074 | 0.116913 |
8 | 0.791667 | 0.12963 | 0.217593 | 0.175926 | 0.003928 |
9 | 0.791667 | 0.12963 | 0.217593 | 0.824074 | 0.018402 |
10 | 0.791667 | 0.12963 | 0.782407 | 0.175926 | 0.014126 |
11 | 0.791667 | 0.12963 | 0.782407 | 0.824074 | 0.066168 |
12 | 0.791667 | 0.87037 | 0.217593 | 0.175926 | 0.026377 |
13 | 0.791667 | 0.87037 | 0.217593 | 0.824074 | 0.123554 |
14 | 0.791667 | 0.87037 | 0.782407 | 0.175926 | 0.094844 |
15 | 0.791667 | 0.87037 | 0.782407 | 0.824074 | 0.444269 |
## [2]
p_0 = probability['p'][birdies['total_birdies']==total_birdies].sum()
## [3]
p_1BIRDIE = 1 - (p_0*p_0)
Solution
print("The probability that BOTH X. Schauffele AND R. McIlroy record AT LEAST 1 BIRDIE during Holes 10-13 is ~ %s" % round(p_1BIRDIE,3))
The probability that BOTH X. Schauffele AND R. McIlroy record AT LEAST 1 BIRDIE during Holes 10-13 is ~ 0.803
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/13/2020