MLB (Red Sox @ Indians): Will there be a HOME RUN hit during INNINGS 4-6?
8:10PM
Yes: 1+ HR hit during Innings 4-6
No: 0 HR hit during Innings 4-6
Inputs To Solve
HR per Game by Team (Red Sox and Indians)
##### User Estimates #####
BOS_HRperG = 1.55
CLE_HRperG = 1.33
expected_total_HR = BOS_HRperG + CLE_HRperG
print("Use %s + %s = %s as total expected HR hit in the game." % (round(BOS_HRperG,3),round(CLE_HRperG,3),round(expected_total_HR,3)))
Use 1.55 + 1.33 = 2.88 as total expected HR hit in the game.
## Inputs Defined in the Problem
period_of_innings = 3
HR = 0
Method to Solve
- [1] Estimate lambda - expected arrival rate of HR for 3 Innings (lambda_)
- [2] Use the Poisson Distribution to compute the probability of 0 HR being hit during Innings 4-6 (p_0)
## [1]
lambda_ = expected_total_HR * period_of_innings / 9
print("lambda = the total expected HOME RUNS hit over %s innings" % period_of_innings)
print("lambda = %s * %s / %s" % (round(expected_total_HR,3),period_of_innings,9))
print("lambda ~ %s" % (round(lambda_,3)))
lambda = the total expected HOME RUNS hit over 3 innings
lambda = 2.88 * 3 / 9
lambda ~ 0.96
## [2]
import math
str_ = ""
print("The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!")
print("where k = [0]")
p_0 = math.exp(-lambda_)*(lambda_**(HR))/(math.factorial(HR))
print('')
print("p_0 = e^(-%s) * (%s^%s)/%s!" % (round(lambda_,2),round(lambda_,2),(HR),(HR)))
The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!
where k = [0]
p_0 = e^(-0.96) * (0.96^0)/0!
Solution
print("The probability that 0 HOME RUNS are Hit during Innings 4-6 is ~%s" % round(p_0,3))
The probability that 0 HOME RUNS are Hit during Innings 4-6 is ~0.383
Posted on 8/12/2019