MLB: Which GAME will have MORE RUNS SCORED during Innings 1-3?
1:10PM
White Sox @ Twins
Mariners @ Rays or Tie
Inputs To Solve
Runs per Game by Team MLB 2019
##### User Estimates #####
ChW_RperG = 4.22
Min_RperG = 5.87
Sea_RperG = 4.91
TBR_RperG = 4.65
expected_RUNS_chw_min = ChW_RperG + Min_RperG
print("Use %s as total expected RUNS to be scored for the ChW @ Min game." % (round(expected_RUNS_chw_min,3)))
expected_RUNS_sea_tbr = Sea_RperG + TBR_RperG
print("Use %s as total expected RUNS to be scored for the Sea @ TB game." % (round(expected_RUNS_sea_tbr,3)))
Use 10.09 as total expected RUNS to be scored for the ChW @ Min game.
Use 9.56 as total expected RUNS to be scored for the Sea @ TB game.
## Inputs Defined in the Problem
period_of_innings = 3
difference = 0
Method to Solve
- [1] Estimate mu_chw_min - expected number of RUNS per 3 Innings for the first game
- [2] Estimate mu_sea_tb - expected number of RUNS per 3 Innings for the second game
- [3] Use mu_chw_min and mu_sea_tb as parameters in the Skellam Distribution (the difference between 2 independent Poisson processes) to compute the probability of the White Sox and Twins scoring more RUNS than the Mariners and Rays during Innings 1-3 (p_chw_min).
## [1]
mu_chw_min = expected_RUNS_chw_min * period_of_innings / 9
print("mu_chw_min = expected number of RUNS per 3 Innings for the first game ~%s" % round(mu_chw_min,3))
mu_chw_min = expected number of RUNS per 3 Innings for the first game ~3.363
## [2]
mu_sea_tb = expected_RUNS_sea_tbr * period_of_innings / 9
print("mu_sea_tb = expected number of RUNS per 3 Innings for the second game ~%s" % round(mu_sea_tb,3))
mu_sea_tb = expected number of RUNS per 3 Innings for the second game ~3.187
## [3]
from scipy.stats import skellam
p_chw_min = 1-skellam.cdf(difference,mu_sea_tb,mu_chw_min)
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 White Sox and Twins score more RUNS than the Mariners and Rays during Innings 1-3 is ~%s" % round(p_chw_min,3))
The probability the White Sox and Twins score more RUNS than the Mariners and Rays during Innings 1-3 is ~0.394
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