fix error in norm-calculation

This commit is contained in:
Yannik Schmidt
2020-06-20 14:24:27 +02:00
parent 993e8e5fa5
commit 31ecac6009

View File

@@ -98,7 +98,7 @@ def predictOutcome(teamA, teamB):
# than a random point from normDistB is normA - normB and then the # than a random point from normDistB is normA - normB and then the
# "1 - Cumulative Distribution Function" (cdf) aka the "Survival Function" (sf) # "1 - Cumulative Distribution Function" (cdf) aka the "Survival Function" (sf)
# of the resulting distribution being greater than zero # of the resulting distribution being greater than zero
prob = scipy.stats.norm(loc=muTeamB-muTeamA, scale=math.sqrt(abs(sigmaTeamB**2-sigmaTeamA**2))).sf(0) prob = scipy.stats.norm(loc=muTeamA-muTeamB, scale=math.sqrt(sigmaTeamB**2+sigmaTeamA**2)).sf(0)
if prob >= 0.5: if prob >= 0.5:
return (0, prob) return (0, prob)
elif prob < 0.5: elif prob < 0.5: