Skip to content

calculations.matches_12_prob_win

Computes match-outcome probabilities (home win / draw / away win) by treating each side’s goals as independent Poisson random variables with means stats_goals_expected_home and stats_goals_expected_away. Joint probability of (h, a) is P(H=h) * P(A=a), summed over the 11×11 grid 0..10 × 0..10.

flowchart LR
m9[/matches_9_expected_goals/] --> me[/calculations.matches_12_prob_win/]
me --> m15[/matches_15_strat_expected_value/]
me --> m17[/matches_17_strat_predicted/]
me --> mart[/mart.matches/]
click m9 "/calculations/matches_9_expected_goals/" "Open"
click m15 "/calculations/matches_15_strat_expected_value/" "Open"
click m17 "/calculations/matches_17_strat_predicted/" "Open"
click mart "/mart/matches/" "Open"
ColumnDescriptionFormula
event_idBet365 event identifier.passthrough
event_dateEvent date.passthrough
event_partition_keyClickHouse partition key.passthrough
score_totalActual total goals (carried for downstream join).passthrough
score_differenceActual goal difference.passthrough
stats_goals_expected_homeExpected home goals (carried).passthrough
stats_goals_expected_awayExpected away goals (carried).passthrough
stats_goals_expected_totalExpected total goals (carried).passthrough
prob_home_winHome-win probability.round(sum(if(home_goals > away_goals, joint_prob, 0)), 4) over home_goals, away_goals ∈ 0..10, where joint_prob = poisson_pmf(stats_goals_expected_home, home_goals) * poisson_pmf(stats_goals_expected_away, away_goals)
prob_drawDraw probability.round(sum(if(home_goals = away_goals, joint_prob, 0)), 4)
prob_away_winAway-win probability.round(sum(if(home_goals < away_goals, joint_prob, 0)), 4)
prob_win_sumSanity check — should be ≈ 1.round(sum(joint_prob), 4)

poisson_pmf is the project macro macros/poisson_pmf.sql.