Home Archives Search Feed Football Squares How To Use


MLB (Yankees v. Red Sox - London, England): Will there be a HOME RUN hit during INNINGS 6-8?


12:10PM ESPN
Yes: 1+ HR hit during Innings 6-8
No: 0 HR hit during Innings 6-8

Inputs Needed to Solve

HRs per Game by team (Yankees and Red Sox)

##### User Estimates #####
NYY_HRperGame = 1.69
BOS_HRperGame = 1.42

total_HRs = NYY_HRperGame + BOS_HRperGame

print("The total expected HRs for the game is %s" % total_HRs)

The total expected HRs for the game is 3.11

## Inputs Defined in the Problem
period_of_innings = 3
HRs= 0

Method to Solve

lambda_ = total_HRs * period_of_innings / 9
print("lambda = the total expected HRs hit by both teams over %s innings" % period_of_innings)
print("lambda = %s * %s / %s" % (round(total_HRs,2),period_of_innings,9))
print("lambda ~ %s" % (round(lambda_,2)))

lambda = the total expected HRs hit by both teams over 3 innings
lambda = 3.11 * 3 / 9
lambda ~ 1.04

import math

p = math.exp(-lambda_)*(lambda_**HRs)/(math.factorial(HRs))

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_,2))
print('')
print("p = e^(-%s) * (%s^%s)/%s!" % (round(lambda_,2),round(lambda_,2),HRs,HRs))

The probability of k events occuring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)
where k = 0 and lambda = 1.04

p = e^(-1.04) * (1.04^0)/0!

print("The probability of zero HRs being hit during Innings 6-8 is %s" % (round(p,3)))

The probability of zero HRs being hit during Innings 6-8 is 0.355

Posted on 6/30/2019






← Next post    ·    Previous post →