NFL Preseason (Bills @ Lions): Will BOTH a RUSHING AND PASSING TD OCCUR in the 1st Half?
8:00PM
Yes: Rush and pass TD in 1st Half
No: At least 1 doesn’t occur in 1st Half
Inputs To Solve
Rushing TDs per Game by Team
Passing TDs per Game by Team
##### User Estimates #####
buf_rush = 0.9
det_rush = 0.7
buf_pass = 0.8
det_pass = 1.4
RushTDperGame = buf_rush + det_rush
PassTDperGame = buf_pass + det_pass
print("The total expected Rushing TDs per Game is %s." % (round(RushTDperGame,3)))
print("The total expected Passing TDs per Game is %s." % (round(PassTDperGame,3)))
The total expected Rushing TDs per Game is 1.6.
The total expected Passing TDs per Game is 2.2.
## Inputs Defined in the Problem
period_of_game = .5
score_event = 0
Method to Solve
- [1] Estimate lambda_rush - expected number of Rushing TDs per half
- [2] Use the Poisson Distribution to compute the probability of zero Rushing TDs in one half (p0_rush)
- [3] Estimate lambda_pass - expected number of Passing TDs per half
- [4] Use the Poisson Distribution to compute the probability of zero Passing TDs in one half (p0_pass)
- [5] The probability both a Rushing TD and a Passing TD occur in the 1st Half (p_both) is the probability one of more Rushing TDs occur (1-p0_rush) multiplied by the probability one or more Passing TDs occur (1-p0_pass)
## [1]
lambda_rush = RushTDperGame * period_of_game
print("lambda_rush ~ the total expected Rushing TDs over one half")
print("lambda_rush ~ %s * %s" % (round(RushTDperGame,3),period_of_game))
print("lambda_rush ~ %s" % (round(lambda_rush,3)))
lambda_rush ~ the total expected Rushing TDs over one half
lambda_rush ~ 1.6 * 0.5
lambda_rush ~ 0.8
## [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_rush = math.exp(-lambda_rush)*(lambda_rush**(score_event))/(math.factorial(score_event))
print("e^(-%s) * (%s^%s)/%s!" % (round(lambda_rush,2),round(lambda_rush,2),(score_event),(score_event)))
print('')
print("p0_rush = %s" % round(p0_rush,3))
The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!
where k = 0
e^(-0.8) * (0.8^0)/0!
p0_rush = 0.449
## [3]
lambda_pass = PassTDperGame * period_of_game
print("lambda_pass ~ the total expected Passing TDs over one half")
print("lambda_pass ~ %s * %s" % (round(PassTDperGame,3),period_of_game))
print("lambda_pass ~ %s" % (round(lambda_pass,3)))
lambda_pass ~ the total expected Passing TDs over one half
lambda_pass ~ 2.2 * 0.5
lambda_pass ~ 1.1
## [4]
print("The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!")
print("where k = 0")
print('')
p0_pass = math.exp(-lambda_pass)*(lambda_pass**(score_event))/(math.factorial(score_event))
print("e^(-%s) * (%s^%s)/%s!" % (round(lambda_pass,2),round(lambda_pass,2),(score_event),(score_event)))
print('')
print("p0_pass = %s" % round(p0_pass,3))
The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!
where k = 0
e^(-1.1) * (1.1^0)/0!
p0_pass = 0.333
## [5]
p_both = (1-p0_rush)*(1-p0_pass)
Solution
print("The probability both a Rushing TD and a Passing TD occur in the 1st Half is ~%s" % round(p_both,3))
The probability both a Rushing TD and a Passing TD occur in the 1st Half is ~0.367
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/23/2019