MLB: Will the Orioles (@ Red Sox) OR Cubs (@ Pirates) SCORE a RUN in the 1st Inning?
7:05PM
Yes: At least 1 Scores a Run in 1st Inning
No: Neither Score a Run in 1st Inning
Inputs To Solve
Runs per Game by Team (Orioles and Cubs)
##### User Estimates #####
Bal_RperG = 4.39
Chc_RperG = 4.95
## Inputs Defined in the Problem
period_of_innings = 1
RUNS = 0
Method to Solve
- [1] Estimate lambda_bal - expected arrival rate of Runs over 1 Inning for the Orioles
- [2] Use the Poisson Distribution to compute the probability of the Orioles scoring 0 RUNS in the 1st Inning (p0_bal)
- [3] Estimate lambda_chc - expected arrival rate of Runs over 1 Inning for the Cubs
- [4] Use the Poisson Distribution to compute the probability of the Cubs scoring 0 RUNS in the 1st Inning (p0_chc)
- [5] The probability neither team SCORES a RUN in the 1st Inning (p0) is the probability the Orioles score 0 RUNS (p0_bal) multiplied by the probability the Cubs score 0 RUNS (p0_chc)
## [1]
lambda_bal = Bal_RperG * period_of_innings / 9
print("lambda_bal ~ the total expected RUNS scored over %s inning by the Orioles" % period_of_innings)
print("lambda_bal ~ %s * %s / %s" % (round(Bal_RperG,3),period_of_innings,9))
print("lambda_bal ~ %s" % (round(lambda_bal,3)))
lambda_bal ~ the total expected RUNS scored over 1 inning by the Orioles
lambda_bal ~ 4.39 * 1 / 9
lambda_bal ~ 0.488
## [2]
import math
print("The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!")
print("where k = 0")
print('')
p0_bal = math.exp(-lambda_bal)*(lambda_bal**(RUNS))/(math.factorial(RUNS))
print("e^(-%s) * (%s^%s)/%s!" % (round(lambda_bal,2),round(lambda_bal,2),(RUNS),(RUNS)))
print('')
print("p0_bal = %s" % round(p0_bal,3))
The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!
where k = 0
e^(-0.49) * (0.49^0)/0!
p0_bal = 0.614
## [3]
lambda_chc = Chc_RperG * period_of_innings / 9
print("lambda_chc ~ the total expected RUNS scored over %s inning by the Cubs" % period_of_innings)
print("lambda_chc ~ %s * %s / %s" % (round(Chc_RperG,3),period_of_innings,9))
print("lambda_chc ~ %s" % (round(lambda_chc,3)))
lambda_chc ~ the total expected RUNS scored over 1 inning by the Cubs
lambda_chc ~ 4.95 * 1 / 9
lambda_chc ~ 0.55
## [4]
print("The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!")
print("where k = 0")
print('')
p0_chc = math.exp(-lambda_chc)*(lambda_chc**(RUNS))/(math.factorial(RUNS))
print("e^(-%s) * (%s^%s)/%s!" % (round(lambda_chc,2),round(lambda_chc,2),(RUNS),(RUNS)))
print('')
print("p0_chc = %s" % round(p0_chc,3))
The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!
where k = 0
e^(-0.55) * (0.55^0)/0!
p0_chc = 0.577
## [5]
p0 = p0_bal * p0_chc
Solution
print("The probability neither team SCORES a RUN in the 1st Inning is ~%s" % round(p0,3))
The probability neither team SCORES a RUN in the 1st Inning is ~0.354
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/16/2019