MLB (Nationals @ Giants): Will BOTH TEAMS SCORE a RUN during Innings 1-2?
3:35PM
Yes: Both teams score during Innings 1-2
No: At least 1 team doesn’t score during Innings 1-2
Inputs Needed To Solve
##### User Estimates #####
WAS_RperG = 4.99
SFG_RperG = 4.27
## Inputs Defined in the Problem
period_of_innings = 2
RUNs = 0
Method to Solve
- define lambda_was as an estimate for the arrival rate of runs for the Nationals in a 2 inning period
- Use Poisson Distribution and lambda_was to compute the probability of a zero runs being scored in a 2 Inning period for the Nationals.
- define lambda_sfg as an estimate for the arrival rate of runs for the Giants in a 2 inning period
- Use Poisson Distribution and lambda_sfg to compute the probability of a zero runs being scored in a 2 Inning period for the Giants.
- The probability that BOTH TEAMS SCORE a RUN during Innings 1-2 is:
(1 - the probability the Nationals score zero runs) * (1 - the probability the Giants score zero runs)
lambda_was = WAS_RperG * period_of_innings / 9
print("lambda_was = the total expected RUNs scored by the Nationals teams over %s inning" % period_of_innings)
print("lambda_was = %s * %s / %s" % (round(WAS_RperG,3),period_of_innings,9))
print("lambda_was = %s" % (round(lambda_was,3)))
lambda_was = the total expected RUNs scored by the Nationals teams over 2 inning
lambda_was = 4.99 * 2 / 9
lambda_was = 1.109
import math
p0_was = math.exp(-lambda_was)*(lambda_was**RUNs)/(math.factorial(RUNs))
print("The probability of k events occurring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)")
print('where k = 0 and lambda = %s' % round(lambda_was,3))
print('')
print("p0_was = e^(-%s) * (%s^%s)/%s!" % (round(lambda_was,3),round(lambda_was,3),RUNs,RUNs))
print('')
print("The probability the Nationals SCORE zero RUNS during Innings 1-2 is %s" % round(p0_was,3))
The probability of k events occurring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)
where k = 0 and lambda = 1.109
p0_was = e^(-1.109) * (1.109^0)/0!
The probability the Nationals SCORE zero RUNS during Innings 1-2 is 0.33
lambda_sfg = SFG_RperG * period_of_innings / 9
print("lambda_sfg = the total expected RUNs scored by the Giants teams over %s inning" % period_of_innings)
print("lambda_sfg = %s * %s / %s" % (round(SFG_RperG,3),period_of_innings,9))
print("lambda_sfg = %s" % (round(lambda_sfg,3)))
lambda_sfg = the total expected RUNs scored by the Giants teams over 2 inning
lambda_sfg = 4.27 * 2 / 9
lambda_sfg = 0.949
import math
p0_sfg = math.exp(-lambda_sfg)*(lambda_sfg**RUNs)/(math.factorial(RUNs))
print("The probability of k events occurring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)")
print('where k = 0 and lambda = %s' % round(lambda_sfg,3))
print('')
print("p0_sfg = e^(-%s) * (%s^%s)/%s!" % (round(lambda_sfg,3),round(lambda_sfg,3),RUNs,RUNs))
print('')
print("The probability the Nationals SCORE zero RUNS during Innings 1-2 is %s" % round(p0_sfg,3))
The probability of k events occurring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)
where k = 0 and lambda = 0.949
p0_sfg = e^(-0.949) * (0.949^0)/0!
The probability the Nationals SCORE zero RUNS during Innings 1-2 is 0.387
p_both_score = (1-p0_was) * (1-p0_sfg)
Solution
print("The probability BOTH TEAMS SCORE a RUN during Innings 1-2 ~%s" % round(p_both_score,3))
The probability BOTH TEAMS SCORE a RUN during Innings 1-2 ~0.411
Posted on 8/7/2019