MLB (Yankees @ Athletics): Which TEAM will record MORE EXTRA-BASE HITS during Innings 4-6?
11:10PM
Yankees: More XBH during Innings 4-6
Athletics: More XBH during Innings 4-6 or Tie
Inputs To Solve
Extra-Base Hit per Game by Team
##### User Estimates #####
NYY_XBHperGame = (225+13+227)/123
HOU_XBHperGame = (245+20+212)/125
#(2B+3B+HR) / GAMES
expected_total_XBH = NYY_XBHperGame + HOU_XBHperGame
print("Use %s + %s = %s as total expected XBH to be hit for the game."
% (round(NYY_XBHperGame,3),round(HOU_XBHperGame,3),round(expected_total_XBH,3)))
Use 3.78 + 3.816 = 7.596 as total expected XBH to be hit for the game.
## Inputs Defined in the Problem
period_of_innings = 3
difference = 0
Method to Solve
- [1] Estimate mu_NYY (expected arrival rate of XBH per 3 Innings for the Yankees)
- [2] Estimate mu_HOU (expected arrival rate of XBH per 3 Innings for the Astros)
- [3] Use mu_NYY and mu_HOU as parameters in the Skellam Distribution (the difference between 2 independent Poisson processes) to compute the probability of the Yankees recording more EXTRA BASE HITS during Innings 4-6 (p_NYY).
## [1]
mu_NYY = NYY_XBHperGame * period_of_innings / 9
print("mu_NYY = the total expected XBH recorded by the Yankees in 3 Innings is ~%s" % round(mu_NYY,3))
mu_NYY = the total expected XBH recorded by the Yankees in 3 Innings is ~1.26
## [2]
mu_HOU = HOU_XBHperGame * period_of_innings / 9
print("mu_HOU = the total expected XBH recorded by the Astros in 3 Innings is ~%s" % round(mu_HOU,3))
mu_HOU = the total expected XBH recorded by the Astros in 3 Innings is ~1.272
## [3]
from scipy.stats import skellam
p_NYY = skellam.cdf(difference,mu_NYY,mu_HOU)
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 Yankees will record MORE EXTRA BASE HITS during Innings 4-6 is ~%s" % round(p_NYY,3))
The probability the Yankees will record MORE EXTRA BASE HITS during Innings 4-6 is ~0.637
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/20/2019