MLB (Phillies @ Braves): What will be the RESULT at the END of the 2nd Inning?
7:20 PM
Either Team Leads
Game Tied
Inputs To Solve
Runs Per Game by Team (Phillies and Braves)
##### User Estimates #####
PHI_RperG = 4.90
ATL_RperG = 5.42
print("Expected RUNS to be scored by the Phillies in the game is %s." % round(PHI_RperG,3))
print("Expected RUNS to be scored by the Braves in the game is %s." % round(ATL_RperG,3))
Expected RUNS to be scored by the Phillies in the game is 4.9.
Expected RUNS to be scored by the Braves in the game is 5.42.
## Inputs Defined in the Problem
period_of_innings = 2
difference = 0
Method to Solve
- Estimate mu_PHI (expected arrival rate of RUNS per 2 Innings for the Phillies)
- Estimate mu_ATL (expected arrival rate of RUNS per 2 Innings for the Braves)
- Use mu_PHI and mu_ATL in the Skellam Distribution (the difference between 2 independant Poisson processes) to compute the probability of the Phillies leading (P_PHI).
- Use mu_PHI and mu_ATL in the Skellam Distribution (the difference between 2 independant Poisson processes) to compute the probability of the Braves leading (P_ATL).
- The probability that either team leads is P_PHI + P_ATL
mu_PHI = PHI_RperG * period_of_innings / 9
mu_ATL = ATL_RperG * period_of_innings / 9
print("mu_PHI = the total expected RUNS scored by the Phillies in 2 Innings is ~%s" % round(mu_PHI,3))
print("mu_ATL = the total expected RUNS scored by the Braves in 2 Innings is ~%s" % round(mu_ATL,3))
mu_PHI = the total expected RUNS scored by the Phillies in 2 Innings is ~1.089
mu_ATL = the total expected RUNS scored by the Braves in 2 Innings is ~1.204
from scipy.stats import skellam
P_PHI = skellam.cdf(difference,mu_PHI,mu_ATL)
P_ATL = skellam.cdf(difference,mu_ATL,mu_PHI)
print("Recall the cdf (cumulative distribution fuction) is P[X<=x] where X is the 'difference' in this example")
Recall the cdf (cumulative distribution fuction) is P[X<=x] where X is the ‘difference’ in this example
Solution
print("The probability of EITHER TEAM LEADING after 2 Innings ~%s" % round(1-P_PHI+1-P_ATL,3))
The probability of EITHER TEAM LEADING after 2 Innings ~0.716
Posted on 7/2/2019