Home Archives Search Feed Football Squares How To Use


PGA Pebble Beach - 1st Rd: How many PARS will Matt Every and Vaughn Taylor record during Holes 1-5


1:00PM
4 or Fewer
5 or More


Inputs To Solve

2019 Course Stats

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

p_par = [97/156, 110/156, 94/156, 105/156, 108/156]

count = 1
for p in p_par:
    print("The probability that a golfer PARS hole " + str(count) + " is %s" % round(p,3))
    count +=1

The probability that a golfer PARS hole 1 is 0.622
The probability that a golfer PARS hole 2 is 0.705
The probability that a golfer PARS hole 3 is 0.603
The probability that a golfer PARS hole 4 is 0.673
The probability that a golfer PARS hole 5 is 0.692

## Inputs Defined in the Problem

total_PARS = 4

Method to Solve

## [1]

import numpy as np
import pandas as pd
# Enumerate all possible combinations of PAR [1] / NO PAR [0]
win = [1,0]

y = np.array([(a,b,c,d,e,v,w,x,y,z) for a in win for b in win for c in win for d in win for e in win
             for v in win for w in win for x in win for y in win for z in win])
K = pd.DataFrame(y)
K['total_PARs'] = K.sum(axis=1)

K.head(10)
0 1 2 3 4 5 6 7 8 9 total_PARs
0 1 1 1 1 1 1 1 1 1 1 10
1 1 1 1 1 1 1 1 1 1 0 9
2 1 1 1 1 1 1 1 1 0 1 9
3 1 1 1 1 1 1 1 1 0 0 8
4 1 1 1 1 1 1 1 0 1 1 9
5 1 1 1 1 1 1 1 0 1 0 8
6 1 1 1 1 1 1 1 0 0 1 8
7 1 1 1 1 1 1 1 0 0 0 7
8 1 1 1 1 1 1 0 1 1 1 9
9 1 1 1 1 1 1 0 1 1 0 8
# Compute the probability of all possible combinations AWAY TEAMS WINNING
x = np.array([(a,v,b,w,c,x,d,y,e,z) for a in [p_par[0],1-p_par[0]] for v in [p_par[0],1-p_par[0]] 
              for b in [p_par[1],1-p_par[1]] for w in [p_par[1],1-p_par[1]] 
              for c in [p_par[2],1-p_par[2]] for x in [p_par[2],1-p_par[2]] 
              for d in [p_par[3],1-p_par[3]] for y in [p_par[3],1-p_par[3]] 
              for e in [p_par[4],1-p_par[4]] for z in [p_par[4],1-p_par[4]]])

probability = pd.DataFrame(x)
probability['p'] = probability.product(axis=1)

probability.head(10)
0 1 2 3 4 5 6 7 8 9 p
0 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.673077 0.673077 0.692308 0.692308 0.015155
1 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.673077 0.673077 0.692308 0.307692 0.006736
2 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.673077 0.673077 0.307692 0.692308 0.006736
3 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.673077 0.673077 0.307692 0.307692 0.002994
4 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.673077 0.326923 0.692308 0.692308 0.007361
5 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.673077 0.326923 0.692308 0.307692 0.003272
6 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.673077 0.326923 0.307692 0.692308 0.003272
7 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.673077 0.326923 0.307692 0.307692 0.001454
8 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.326923 0.673077 0.692308 0.692308 0.007361
9 0.621795 0.621795 0.705128 0.705128 0.602564 0.602564 0.326923 0.673077 0.692308 0.307692 0.003272
## [2]
    
p_sum_par =  probability['p'][K['total_PARs']<=total_PARS].sum()

Solution

print("The probability that Every and Taylor record 4 or Fewer PARS on Holes 1-5 is ~%s" % round(p_sum_par,3))

The probability that Every and Taylor record 4 or Fewer PARS on Holes 1-5 is ~0.084




Info

download markdown file
email: krellabsinc@gmail.com
twitter: @KRELLabs

import sys
print(sys.version)

3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]

Posted on 2/6/2020






← Next post    ·    Previous post →