Home Archives Search Feed Football Squares How To Use


MLB: Will the Yankees (@ Tigers) AND Dodgers (@ Orioles) BOTH SCORE during Innings 1-2?


6:40PM
Yes: Both score during Innings 1-2
No: At least 1 doesn’t score during Innings 1-2


Inputs To Solve

Runs per Game by Team

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

NYY_RperG = 5.77
LAD_RperG = 5.46
## Inputs Defined in the Problem
period_of_innings = 2
Runs = 0

Method to Solve

## [1]

lambda_nyy = NYY_RperG * period_of_innings / 9
print("lambda_nyy = the total expected XBH over %s innings" % period_of_innings)
print("lambda_nyy = %s * %s / %s" % (round(NYY_RperG,3),period_of_innings,9))
print("lambda_nyy ~ %s" % (round(lambda_nyy,3)))
lambda_nyy = the total expected XBH over 2 innings
lambda_nyy = 5.77 * 2 / 9
lambda_nyy ~ 1.282
## [2]

import math

p0_nyy = math.exp(-lambda_nyy)*(lambda_nyy**Runs)/(math.factorial(Runs))

print("The probability of k events occuring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)")
print('where k = 0 and lambda = %s' % round(lambda_nyy,3))
print('')
print("p0_nyy = e^(-%s) * (%s^%s)/%s!" % (round(lambda_nyy,2),round(lambda_nyy,2),Runs,Runs))
The probability of k events occuring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)
where k = 0 and lambda = 1.282

p0_nyy = e^(-1.28) * (1.28^0)/0!
## [3]

lambda_lad = LAD_RperG * period_of_innings / 9
print("lambda_lad = the total expected XBH over %s innings" % period_of_innings)
print("lambda_lad = %s * %s / %s" % (round(LAD_RperG,3),period_of_innings,9))
print("lambda_lad ~ %s" % (round(lambda_lad,3)))
lambda_lad = the total expected XBH over 2 innings
lambda_lad = 5.46 * 2 / 9
lambda_lad ~ 1.213
## [4]

p0_lad = math.exp(-lambda_lad)*(lambda_lad**Runs)/(math.factorial(Runs))

print("The probability of k events occuring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)")
print('where k = 0 and lambda = %s' % round(lambda_lad,3))
print('')
print("p0_lad = e^(-%s) * (%s^%s)/%s!" % (round(lambda_lad,2),round(lambda_lad,2),Runs,Runs))
The probability of k events occuring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)
where k = 0 and lambda = 1.213

p0_lad = e^(-1.21) * (1.21^0)/0!
## [5]

p_neither = (1-p0_nyy) * (1-p0_lad)

Solution

print("The probability that neither team scores during Innings 1-2 ~%s" % round(p_neither,3))
The probability that neither team scores during Innings 1-2 ~0.508



Info

download md 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 9/10/2019






← Next post    ·    Previous post →