Home Archives Search Feed Football Squares How To Use


Spanish Primera Division (Atletico Madrid @ Barcelona): Will EITHER TEAM SCORE 2+ GOALS in the 2nd Half?


5:02 PM
Yes: At least 1 team scores 2+ goals in 2H
No: Neither team scores 2+ goals in 2H


Inputs to Solve

Expected Goals for Each Team for the 2nd Half

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

Am_2nd_OU = 1
Barc_2nd_OU = 1.5

# over / unders
## Inputs Defined in the Problem

GOALS = 2
time = 0.5

Method to Solve

## [1]

l_am = float(Am_2nd_OU * time)
print("The total expected GOALS in a half for Atletico Madrid is %s" % round((l_am),3))

l_barc = float(Barc_2nd_OU * time)
print("The total expected GOALS in a half for Barcelona is %s" % round((l_barc),3))

The total expected GOALS in a half for Atletico Madrid is 0.5
The total expected GOALS in a half for Barcelona is 0.75

## [2]

from scipy.stats import poisson

p_2_am = poisson.cdf(GOALS-1,l_am)
print("The probability Atletico Madrid scores less than 2 GOALS in the 2nd Half is %s" % round((p_2_am),3))

p_2_barc = poisson.cdf(GOALS-1,l_barc)
print("The probability Barcelona scores less than 2 GOALS in the 2nd Half is %s" % round((p_2_barc),3))

The probability Atletico Madrid scores less than 2 GOALS in the 2nd Half is 0.91
The probability Barcelona scores less than 2 GOALS in the 2nd Half is 0.827

## [3]

p_either = 1 - (p_2_am*p_2_barc)

Solution

print("The probability either team Scores 2 or MORE GOALS in the 2nd Half is %s" % round(p_either,3))

The probability either team Scores 2 or MORE GOALS in the 2nd Half is 0.248




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/30/2020






← Next post    ·    Previous post →