Home Archives Search Feed Football Squares How To Use


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

Expected Goals for the Match

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

expected_G_Per_Game = 1.75
# over / under
## Inputs Defined in the Problem

time = 20
difference = 0

Method to Solve

## [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






← Next post    ·    Previous post →