2019 Copa America - Qtrs (Argentina v. Venezuela - Rio de Janeiro, Brazil): Which of these sides will SCORE FIRST?
3:01PM BEIN
Lionel Messi (ARG) or Neither side score
Venezuela
Inputs Needed To Solve
Over / Under Odds for the match
Messi Goals per Game
##### User Estimates #####
expected_total_Goals = 2.5
messi_Goals_per_Game = 7/14
## Inputs Defined in the Problem
neither_happens = 0
first_to = 1
Method to Solve
- Estimate lambda_lm (estimated arrival rate of goals by Messi)
- Estimate lambda_vz (estimated arrival rate of goals for Venezuela)
- Use Poisson Distribution to estimate the probability that neither happen: * the probability of 0 GOALs being SCORED by each side
- Use the Poisson Distribution assumptions and the below equation to compute the probability of Messi scoring before Venezuela given neither happens.
lambda_lm = messi_Goals_per_Game
lambda_vz = expected_total_Goals / 2
print("lambda_lm ~%s" % (round(lambda_lm,3)))
print("lambda_vz ~%s" % (round(lambda_vz,3)))
lambda_lm ~0.5
lambda_vz ~1.25
import math
p = math.exp(-lambda_lm)*(lambda_lm**neither_happens)/(math.factorial(neither_happens))
print("The probability of k events occurring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)")
print('where k = 0 and lambda = %s' % round(lambda_lm,3))
print('')
print("p = e^(-%s)*(%s^%s)/%s!" % (round(lambda_lm,3),round(lambda_lm,3),neither_happens,neither_happens))
print("The probability that Messi does not score is %s" % round(p,3))
p_lm = p
The probability of k events occurring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)
where k = 0 and lambda = 0.5
p = e^(-0.5)*(0.5^0)/0!
The probability that Messi does not score is 0.607
p = math.exp(-lambda_vz)*(lambda_vz**neither_happens)/(math.factorial(neither_happens))
print("The probability of k events occurring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)")
print('where k = 0 and lambda = %s' % round(lambda_vz,3))
print('')
print("p = e^(-%s)*(%s^%s)/%s!" % (round(lambda_vz,3),round(lambda_vz,3),neither_happens,neither_happens))
print("The probability that Venezuela does not score is %s" % round(p,3))
p_vz = p
The probability of k events occurring in an Poisson interval = e^(-lambda) * ((lambda^k)/k!)
where k = 0 and lambda = 1.25
p = e^(-1.25)*(1.25^0)/0!
The probability that Venezuela does not score is 0.287
print("The probability that neither Messi or Venezuela score is %s" % (round(p_lm*p_vz,3)))
The probability that neither Messi or Venezuela score is 0.174
n = first_to
m = first_to
p = 0
for k in range(n,n+m):
ans = math.factorial(n+m-1)/(math.factorial((n+m-1)-k)*math.factorial(k))
ans1 = (lambda_lm/(lambda_lm+lambda_vz))**k
ans2 = (lambda_vz/(lambda_lm+lambda_vz))**(n+m-1-k)
p += (ans*ans1*ans2)
print("The probability that Messi scores before Venezuela given one or the other happens is %s" % round(p,3))
The probability that Messi scores before Venezuela given one or the other happens is 0.286
Solution
p_ = (p_lm*p_vz + (p/(1-p_lm*p_vz)))
print("The probability that Lionel Messi scores 1st or Neither side score %s" % round(p_,3))
The probability that Lionel Messi scores 1st or Neither side score 0.52
Posted on 6/28/2019