Home Archives Search Feed Football Squares How To Use


UEFA Champions League: How many GOALS will be SCORED in the 1st Half of today’s UCL matches? (3 matches)


3:00PM
4 Goals or Fewer
5 Goals or More


Inputs To Solve

Over Under for Each Match

##### User Estimates #####
over_under_match1 = 2.5
over_under_match2 = 2.5
over_under_match3 = 2.5

expected_total_Goals = over_under_match1*3

print("The total expected GOALS SCORED in the 3 Matches is %s" % (expected_total_Goals))
The total expected GOALS SCORED in the 3 Matches is 7.5
## Inputs Defined in the Problem
period_of_game = 0.5
goals = 4

Method to Solve

## [1]
lambda_goals = expected_total_Goals * period_of_game
print("lambda_goals = the total expected GOALS SCORED in the 1st Half")
print("lambda_goals = %s * %s" % (round(expected_total_Goals,3),period_of_game))
print("lambda_goals ~ %s" % (round(lambda_goals,3)))
lambda_goals = the total expected GOALS SCORED in the 1st Half
lambda_goals = 7.5 * 0.5
lambda_goals ~ 3.75
## [2]

import math

str_ = ""
print("The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!")
print("where k = [0,1,2,3,4]")
print(' ')

p_4orless = 0
for i in range(goals+1):
    p_4orless += math.exp(-lambda_goals)*(lambda_goals**(i))/(math.factorial(i))
    
    if(i<=3):
        str_ += str(round(math.exp(-lambda_goals)*(lambda_goals**(i))/(math.factorial(i)),3)) + " + "
        print("e^(-%s) * (%s^%s)/%s! + " % (round(lambda_goals,2),round(lambda_goals,2),(i),(i)))
    else:
        str_ += str(round(math.exp(-lambda_goals)*(lambda_goals**(i))/(math.factorial(i)),3))
        print("e^(-%s) * (%s^%s)/%s!" % (round(lambda_goals,2),round(lambda_goals,2),(i),(i)))

print('')
print('p_4orless = ' + str_)
The probability of k events occurring in a Poisson interval = e^(-lambda) * (lambda^k)/k!
where k = [0,1,2,3,4]
 
e^(-3.75) * (3.75^0)/0! + 
e^(-3.75) * (3.75^1)/1! + 
e^(-3.75) * (3.75^2)/2! + 
e^(-3.75) * (3.75^3)/3! + 
e^(-3.75) * (3.75^4)/4!

p_4orless = 0.024 + 0.088 + 0.165 + 0.207 + 0.194

Solution

print("The probability that 4 or Less GOALS are SCORED during the 1st Half of the 3 matches is ~%s" % round(p_4orless,3))
The probability that 4 or Less GOALS are SCORED during the 1st Half of the 3 matches is ~0.678



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 8/27/2019






← Next post    ·    Previous post →