MLB (Mariners @ Athletics): Will a RUN be SCORED in the 8th Inning?
6:00 PM
Yes: Runs scored in 8th Inning
No:: 0 Runs in 8th Inning
Inputs Needed To Solve
##### User Estimates #####
SEA_RperG = 4.96
OAK_RperG = 5.18
total_RUNS = OAK_RperG+SEA_RperG
print("Total expected RUNs for the game as %s + %s = %s." % (SEA_RperG,OAK_RperG,total_RUNS))
Total expected RUNs for the game as 4.96 + 5.18 = 10.14.
## Inputs Defined in the Problem
period_of_innings = 1
RUNs = 0
Method to Solve
- define lambda as expected runs per game
- Use Poisson Distribution to estimate the probability of a RUN being scored in any one inning
lambda_ = total_RUNS * period_of_innings / 9
print("lambda = the total expected RUNs scored by the both teams over %s inning" % period_of_innings)
print("lambda = %s * %s / %s" % (round(total_RUNS,3),period_of_innings,9))
print("lambda ~ %s" % (round(lambda_,3)))
lambda = the total expected RUNs scored by the both teams over 1 inning
lambda = 10.14 * 1 / 9
lambda ~ 1.127
import math
p = math.exp(-lambda_)*(lambda_**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_,3))
print('')
print("p = e^(-%s) * (%s^%s)/%s!" % (round(lambda_,3),round(lambda_,3),RUNs,RUNs))
The probability of k events occurring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)
where k = 0 and lambda = 1.127
p = e^(-1.127) * (1.127^0)/0!
Solution
print("The probability that zero RUNS are scored during the 8th Inning is ~%s" % round(p,3))
The probability that zero RUNS are scored during the 8th Inning is ~0.324
Posted on 7/17/2019