MLB (Giants @ Cubs): Which TEAM will record MORE HITS during Innings 1-3?
8:05PM
Giants: More Hits Innings 1-3 or Tie
@ Cubs: More Hits Innings 1-3
Inputs To Solve
Hits per Game by Team MLB 2019
##### User Estimates #####
SF_HperG = 8.29
ChC_HperG = 8.5
## Inputs Defined in the Problem
period_of_innings = 3
difference = 0
Method to Solve
- [1] Estimate mu_sf - expected number of HITS per 3 Innings for the Giants
- [2] Estimate mu_chc - expected number of HITS per 3 Innings for the Cubs
- [3] Use mu_sf and mu_chc as parameters in the Skellam Distribution (the difference between 2 independent Poisson processes) to compute the probability of the Cubs recording more HITS than the Giants during Innings 1-3 (p_chc).
## [1]
mu_sf = SF_HperG * period_of_innings / 9
print("mu_sf = expected number of HITS per 3 Innings for the Giants ~%s" % round(mu_sf,3))
mu_sf = expected number of HITS per 3 Innings for the Giants ~2.763
## [2]
mu_chc = ChC_HperG * period_of_innings / 9
print("mu_chc = expected number of HITS per 3 Innings for the Cubs ~%s" % round(mu_chc,3))
mu_chc = expected number of HITS per 3 Innings for the Cubs ~2.833
## [3]
from scipy.stats import skellam
p_chc = 1-skellam.cdf(difference,mu_sf,mu_chc)
print("Recall the cdf (cumulative distribution function) is P[X<=x] where x is the 'difference' in this example")
Recall the cdf (cumulative distribution function) is P[X<=x] where x is the 'difference' in this example
Solution
print("The probability the Cubs record more HITS than the Giants during Innings 1-3 is ~%s" % round(p_chc,3))
The probability the Cubs record more HITS than the Giants during Innings 1-3 is ~0.402
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/21/2019