Home Archives Search Feed Football Squares How To Use


MLB (Braves @ Mets): How many STRIKEOUTS will Jacob deGrom (NYM) record in the 1st Inning?


7:10PM
0 or 1
2 or More


Inputs To Solve

deGrom Pitcher STRIKEOUT per OUT Rate

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

deG_2019_KRate = 194/(155*3)
# Total Ks / Number of Outs Recorded

print("Jacob deGrom's 2019 K per Out rate is ~%s" % round(deG_2019_KRate,3))
Jacob deGrom's 2019 K per Out rate is ~0.417
## Inputs Defined in the Problem
Innings = 1
Ks = 1

Method to Solve

## [1]

import numpy as np
import pandas as pd
# deGrom K / no K probability
p_K_deG = deG_2019_KRate
p_no_K_deG = 1 - p_K_deG
prob_deG = (p_K_deG,p_no_K_deG)
K_grid = (1,0)
# Enumerate all possible combinations of K / no K for 1 Innings 
y = np.array([(a,b,c) for a in K_grid for b in K_grid for c in K_grid])
K = pd.DataFrame(y)
K['total_Ks'] = K.sum(axis=1)

K.head()
0 1 2 total_Ks
0 1 1 1 3
1 1 1 0 2
2 1 0 1 2
3 1 0 0 1
4 0 1 1 2
# Compute the probability of all possible combinations of K / no K for 1 Innings
x = np.array([(a,b,c) for a in prob_deG for b in prob_deG for c in prob_deG])
probability = pd.DataFrame(x)
probability['p'] = probability.product(axis=1)

probability.head()
0 1 2 p
0 0.417204 0.417204 0.417204 0.072618
1 0.417204 0.417204 0.582796 0.101441
2 0.417204 0.582796 0.417204 0.101441
3 0.417204 0.582796 0.582796 0.141704
4 0.582796 0.417204 0.417204 0.101441
## [2]

p_0or1 = probability['p'][K['total_Ks']<=Ks].sum()

Solution

print("The probability Jacob deGrom records 0 or 1 STRIKEOUTS in the 1st Innings is ~%s" % round(p_0or1,3))
The probability Jacob deGrom records 0 or 1 STRIKEOUTS in the 1st Innings is ~0.623



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 8/23/2019






← Next post    ·    Previous post →