EPL (Burnley @ Crystal Palace): Which TIME FRAME will MORE GOALS be SCORED in?
3:00PM
1st Minute through 20th Minute or Tie
21st Minute through End of the 1st Half
Inputs to Solve
##### User Estimates #####
expected_G_Per_Game = 1.75
# over / under
## Inputs Defined in the Problem
time = 20
difference = 0
Method to Solve
- [1] Estimate mu_20 - expected arrival rate of GOALS for the first 20 minutes of the 1st half
- [2] Estimate mu_45 - expected arrival rate of GOALS from the 21st minute until the end of the 1st half
- [3] Use mu_20 and mu_45 in the Skellam Distribution (the difference between 2 independant Poisson processes) to compute the probability of more goals being scored after the 21st minute (p_45) than on the first 20 minutes of the 1st half.
## [1]
mu_20 = float(expected_G_Per_Game * time) / 90
print("mu_20 = the total expected GOALS scored in the first 20 minutes of the 1st half is ~%s" % round(mu_20,3))
mu_20 = the total expected GOALS scored in the first 20 minutes of the 1st half is ~0.389
## [2]
mu_45 = float(expected_G_Per_Game * (45-time)) / 90
print("mu_45 = the total expected GOALS scored in after the 21st minute of the 1st half is ~%s" % round(mu_45,3))
mu_45 = the total expected GOALS scored in after the 21st minute of the 1st half is ~0.486
## [3]
from scipy.stats import skellam
p_20 = skellam.cdf(difference,mu_45,mu_20)
p_45 = 1 - p_20
print("Recall the cdf (cumulative distribution fuction) is P[X<=x] where X is the 'difference' in this example")
Recall the cdf (cumulative distribution fuction) is P[X<=x] where X is the 'difference' in this example
Solution
print("The probability the 21st Minute through the end of the 1st Half has MORE GOALS SCORED is ~ %s" % round(p_45,3))
The probability the 21st Minute through the end of the 1st Half has MORE GOALS SCORED is ~ 0.284
Info
download markdown file
email: krellabsinc@gmail.com
twitter: @KRELLabs
import sys
print(sys.version)
3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)]
Posted on 6/29/2020