Home Archives Search Feed Football Squares How To Use


MLB (Twins @ Brewers): Will BOTH TEAMS record an EXTRA-BASE HIT during Innings 1-2?

2:10PM
Yes: Both teams record XBH during Innings 1-2
No: At least 1 team doesn’t record XBH during Innings 1-2


Inputs To Solve

XBH per Game by Team (Twins and Brewers)

##### User Estimates #####

MIN_XperG = 2.01 + 0.13 + 1.93
MIL_XperG = 1.69 + 0.13 + 1.57
##          2B     3B     HR


print("The total expected XBH be recorded in the game by the Twins is %s." % (round(MIN_XperG,3)))
print("The total expected XBH be recorded in the game by the Brewers is %s." % (round(MIL_XperG,3)))

The total expected XBH be recorded in the game by the Twins is 4.07.
The total expected XBH be recorded in the game by the Brewers is 3.39.

## Inputs Defined in the Problem

period_of_innings = 2
XBH = 0

Method to Solve

## [1]

lambda_min = MIN_XperG * period_of_innings / 9
print("lambda_min ~ the total expected XBH recorded over %s innings by the Twins" % period_of_innings)
print("lambda_min ~ %s * %s / %s" % (round(MIN_XperG,3),period_of_innings,9))
print("lambda_min ~ %s" % (round(lambda_min,3)))

lambda_min ~ the total expected XBH recorded over 2 innings by the Twins
lambda_min ~ 4.07 * 2 / 9
lambda_min ~ 0.904

## [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_min = math.exp(-lambda_min)*(lambda_min**(XBH))/(math.factorial(XBH))
print("e^(-%s) * (%s^%s)/%s!" % (round(lambda_min,2),round(lambda_min,2),(XBH),(XBH)))


print('')
print("p0_min = %s" % round(p0_min,3))

The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!
where k = 0

e^(-0.9) * (0.9^0)/0!

p0_min = 0.405

## [3]

lambda_mil = MIL_XperG * period_of_innings / 9
print("lambda_mil ~ the total expected XBH recorded over %s innings by the Brewers" % period_of_innings)
print("lambda_mil ~ %s * %s / %s" % (round(MIL_XperG,3),period_of_innings,9))
print("lambda_mil ~ %s" % (round(lambda_mil,3)))

lambda_mil ~ the total expected XBH recorded over 2 innings by the Brewers
lambda_mil ~ 3.39 * 2 / 9
lambda_mil ~ 0.753

## [4]

print("The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!")
print("where k = 0")
print('')

p0_mil = math.exp(-lambda_mil)*(lambda_mil**(XBH))/(math.factorial(XBH))
print("e^(-%s) * (%s^%s)/%s!" % (round(lambda_mil,2),round(lambda_mil,2),(XBH),(XBH)))


print('')
print("p0_mil = %s" % round(p0_mil,3))

The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!
where k = 0

e^(-0.75) * (0.75^0)/0!

p0_mil = 0.471

## [5]

pXBH_both = (1-p0_min)*(1-p0_mil)

Solution

print("The probability both teams record an XBH during Innings 1-2 is ~%s" % round(pXBH_both,3))

The probability both teams record an XBH during Innings 1-2 is ~0.315

Posted on 8/14/2019






← Next post    ·    Previous post →