Log-Linear Poisson Models Soccer
Log-Linear Poisson Models Soccer
A Mathematical Approach
1
I hereby declare that I am the sole author of this thesis.
I authorize Princeton University to lend this thesis to other institutions or individuals for
the purpose of scholarly research.
Andrei C. Grecu
Andrei C. Grecu
2
To my grandfather, Nicolae Dumitrescu
3
ACKNOWLEDGEMENTS
thesis, his advice and his unyielding support. I would also want to thank Professor
Vanderbei, Professor Powell, and Professor Lord for teaching me a lot of the material
used in this thesis. In addition, I am indebt to the whole Princeton community for
Dear family, thank you for your incredible support from thousands of miles away,
4
TABLE OF CONTENTS
CHAPTER 1: INTRODUCTION……………………… 6 – 11
CHAPTER 5: CONCLUSION…………………………66 – 69
BIBLIOGRAPHY……………………………………… 77 – 78
5
Chapter 1: Introduction Andrei C. Grecu
Chapter1: Introduction
The Soccer World Cup tournament, held every four years, is the most watched
sports event in the world, surpassing even the Olympic Games. Moreover, enthusiasm for
soccer is relatively uniformly spread across the world, both in term of spectators and
actual participants. For example, 194 national teams, essentially a team for every country
in the world, competed in qualifying games for a place in the next World Cup final
tournament, which will take place in Germany, in June-July 2006. Given the international
appeal of soccer and of the World Cup in particular, there is a huge interest in assessing
the relative strengths of the teams that take part in the tournament and implicitly
The intrinsic complexity of the World Cup tournament makes the job of ranking
participating teams both challenging and mathematically stirring. In the first phase of the
tournament, over a period of about two years, approximately 200 national teams compete
in qualifying games on five continents, with the highest ranked teams in each
6
Chapter 1: Introduction Andrei C. Grecu
teams travel to the country that organizes the World Cup and embark upon a marathon of
games. Initially, the 32 teams are divided into eight groups of four, with each group
playing six round robin matches. Following the initial games, the top two teams from
each group advance to the second round of the final tournament, which consists of a
simple 16-team knockout tournament. Thus, after approximately one month and 64
matches played, the final of the World Cup determines the World Cup Champion, “the
best” national team in the world for the next four years.
While the World Cup effectively compares teams by having them play against
one another on the soccer field, any attempt to rank the teams before the start of the
competition faces a number of challenges. First, by its very nature soccer is a highly
unpredictable game- only a few goals are scored during the ninety minutes of a normal
game, and as opposed to baseball or football, few statistics are recorded for each game.
Second, participating teams come from various regions of the world, in which soccer is
played at different levels- even though the winner of a geographic region might be much
weaker than the winner of another region, the format of the World Cup guarantees that
teams from all regions take part in the final tournament. Third, the relative rarity of
games between national teams makes it difficult to find sources for comparison- a soccer
national team only plays an average of ten games every year, so there are still national
teams that have never played one another. Despite the challenges discussed here, a
number of papers have tried to model soccer scores and simulate the World Cup
tournament.
7
Chapter 1: Introduction Andrei C. Grecu
Literature Review
Kuonen (1997) fits a logistic regression for the probability of winning a soccer
game, based on seeding coefficients computed from the outcome of previous games
played by the two teams. Karlis and Ntzoufras (1998) examine the choice of a Poisson
distribution for modeling goals in soccer games and build a Poisson log-linear model for
scores in the Greek national league. Dyte and Clarke (2000) also assume a Poisson
distribution of goals and model the 2002 World Cup based on the (controversial) national
The Palomino, Rigotti, and Rustichini (1998) model, inspired from game theory, looks at
a soccer game in continuous time and examines the effect of three factors- team’s ability
score), in determining the outcome of a soccer game. Finally, Koning (2001) simulates
soccer championships using a Poisson fit to predict game outcomes based on historical
Simulating the soccer World Cup final tournament is even more challenging
than simulating the games in a national league. Teams that compete in the World Cup
final tournament come from different qualifying tournaments, in which the soccer played
can have different characteristics. For example, national teams in South America tend to
score on average more goals when they play each other than teams in Europe do.
Therefore, the average number of goals scored per game might not be the best variable to
predict the result of an encounter between a team in South America and a team in Europe.
In all the models mentioned in the previous paragraph, the variables used in fitting the
regressions are derived from aggregate statistics of the previous performance of the two
8
Chapter 1: Introduction Andrei C. Grecu
teams. This approach might be reasonable for teams competing against the same
opponents in a league, but in the case of the World Cup we need to adjust the variables to
account for the different backgrounds from which participating teams come from.
Regarding the soccer World Cup as a competition between teams coming from
different regional tournaments brings to mind the problem faced every year by the Bowl
Championship Series (BCS) in ranking American college football teams. The two
problems- ranking college football teams and ranking World Cup soccer teams, are
similar in that: i) the number of games played by every team is relatively small, ii) teams
play many more games within their regional league than against teams in other leagues,
and iii) crucially, the quality of the opponents of different teams varies from region to
region. Thus, the techniques used to rank college football teams can be tailored to rank
The theory behind ranking teams in uneven paired competitions has strong and
linear eigenvalue problem and solves it by using the result of the Perron-Frobenius
theorem. Goddard (1983), Stob (1985) and Ali, Cook, and Kress (1986) develop
algorithms for rankings that satisfy the so-called minimum violations ranking (MVR)
criterion, which minimizes the instances in which lower ranked teams defeat higher
ranked teams. Wilson (1995) builds a neural network based on previous interactions
between teams and looks for the equilibrium values of the network. Finally, Thomson
(1975) and Reid (2003) design least squares and maximum likelihood methods for
ranking teams. Even though some these rankings have strong mathematical foundations,
9
Chapter 1: Introduction Andrei C. Grecu
all ranking methods are intrinsically subjective by means of the variables chosen to
explain outcomes, the parameters of the model, and the final interpretation of the results.
Overview
This thesis looks at the soccer World Cup and uses mathematical tools to
determine the relative strengths of the participating teams and simulate the structure of
games within the tournament. Given the various backgrounds of the qualified teams, and
the complexity of the World Cup tournament, I use a three-step approach to assessing the
relative strengths of the national soccer teams that participate in the soccer World Cup.
before the start of the tournament: i) a matrix-based method takes as input previous
interactions among teams and returns an eigenvector with the relative value assigned to
each team. ii) a random walker algorithm looks at the steady-state macroscopic solution
regarding their favorite team, thus executing random walks on a network defined by the
participating teams (nodes) and their previous interactions (edges). iii) a neural network
algorithm looks at a neural network whose nodes are the participating teams and whose
connections are determined by previous interactions among the teams, and uses a soccer-
intuitive transfer function to update the value of each node (team) until a steady state
solution is reached.
regarding the outcome of separate games in the World Cup. I start by assuming a Poisson
distribution of goals scored in a soccer game and I fit a nonlinear regression using the
10
Chapter 1: Introduction Andrei C. Grecu
number of goals scored by each team in the games from the 2002 World Cup. Using the
competing in a World Cup game. However, given the complex structure of the soccer
World Cup, it is difficult to explicitly calculate the conditional probabilities for each team
Third, the simulation of the World Cup games performed in Chapter 4 allows me
to determine the probability of winning the World Cup assigned to each team. In order to
determine the manner in which teams are favored or disadvantaged by the World Cup
draw, I also simulate a round robin competition between all the teams qualified for the
World Cup. Even though such full competition is not possible in practice because of the
determining the best team. Therefore, by comparing the winning probabilities from the
World Cup simulation with the winning probabilities from the round robin simulation, I
am able to determine which teams had a “lucky draw” for the World Cup games.
the 2002 World Cup, making predictions for the up-coming 2006 World Cup, and
11
Chapter 2: Ranking Algorithms Andrei C. Grecu
Overview
This chapter presents three algorithms used for ranking the 32 soccer national
teams that qualified for the 2006 Soccer World Cup. By looking at historical games
played between soccer national teams around the world, each algorithm returns the
relative values of the teams prior to the start of the tournament. Whilst past performance
is not always a good indicator of the present value of a team, I will focus on those
historical games that are most relevant to the real value of the teams.
First, I look at games that took place in conditions somehow similar to the World
championship. Luckily, independent of the World Cup, national soccer teams also
compete for regional supremacy on each continent. Thus, every two years, African
countries compete in the African Nations Cup. Every four years, national teams in Asia
compete for the Asian Cup. Held every two years, the CONCACAF Gold Cup reunites
teams in North America. Every three years, teams in South America take part in Copa
America. Finally, every four years the best teams in Europe participate in the European
interactions between teams on the same continent. Conveniently, the World Cup, which
takes place every four years, reunites teams from all over the world, thus allowing
12
Chapter 2: Ranking Algorithms Andrei C. Grecu
comparable strength. For ranking purposes, the fact that Australia beat Cook Islands 16-0
is far less relevant than a tight game between two teams of comparable strengths, such as
Germany and Argentina. Therefore, I will focus my analysis only on games in which both
teams qualified for at least one of the previous three World Cups. This totals 55
competitive teams, with 26 teams from Europe, 9 from Africa, 8 from South America, 7
North
America Europe
(5) (29)
Asia
(7)
South
America Africa
(8) (8)
Even though only 32 soccer teams qualified for the 2006 World Cup, I choose to
look at games played among 55 teams of comparable strength. By looking at more games
and ranking 55 instead of only 32 teams, I increase the precision of the algorithms in
determining the values of the 32 teams that did qualify for the World Cup. For example,
even though Cameroon did not qualify for the World Cup this year, its previous games
13
Chapter 2: Ranking Algorithms Andrei C. Grecu
against competitive teams around the world allows us to better rank other African teams.
For instance, Togo qualified for the first time to the World Cup this year, so it does not
have direct previous interactions with teams on other continents. However, its games
against Cameroon and other African countries allow us to better determine Togo’s overall
strength.
Finally, I consider games played between soccer national teams over the last 12
years. Although this is a long period of time, each game is also assigned a weight that
decreases with the number of years since the game took place. Thus, a game that took
place ten years ago is approximately ten times less significant in determining the current
value of the team than a game that took place this year is. In addition, a lot of skilled
soccer players start playing for their national teams when they are very young and they
do play for ten or twelve years before they retire. Also, it is not unusual for a national
team to form around a nucleus of talented players who will play for their country for
approximately a decade. Consequently, putting heavy weights on recent games, but also
decreasing weights on past encounters, effectively captures the relative strengths of the
(FIFA) also uses results from the previous eight years in computing its coefficients for
each country.
competitive tournament, in which the teams play their best players at full potential. In
14
Chapter 2: Ranking Algorithms Andrei C. Grecu
2. African Nations Cup: Egypt 2006, Tunisia 2004, Mali 2002, Ghana 2000,
3. Asian Cup: China 2004, Lebanon 2000, United Arab Emirates 1996
4. CONCACAF Gold Cup: USA 2005, Mexico 2003, USA 2002, USA 2000,
5. Copa America: Peru 2004, Colombia 2001, Paraguay 1999, Bolivia 1997,
Uruguay 1995
1996
Acknowledgements
The first algorithm is inspired from the matrix-based algorithms for ranking
American college football teams, as discussed in Keener (1993), Boginski, Butenko, and
Pardalos (2004), and Martinich (2003). The second algorithm is a variation of the random
walker algorithm discussed in Callaghan, Mucha, and Porter (2005). The third algorithm
is a neural network method somehow similar to the approach presented in Wilson (1995).
However, I modify each of these algorithms in at least two important ways. First,
I implement soccer-intuitive functions and parameters in each algorithm, so that they deal
with results of soccer rather than football games. Second, since I look at games that took
place over a longer period of time, I discount the importance assigned to each game, so
that recent games have a much greater impact on the rankings than older games do.
15
Chapter 2: Ranking Algorithms Andrei C. Grecu
The Intuition
“Spain beat Italy, and Italy beat Brazil, therefore Spain should win against
Brazil” or more intricate “Brazil tied against Germany, Germany beat Japan, and Brazil
lost against Italy, therefore Italy should definitely win against Japan”- sport fans often
make such kinds of conjectures regarding the outcome of future games based on previous
results. Even though such predictions often turn out to be wrong, the deduction process is
not entirely speculative, as previous games do contain information regarding the relative
strengths of the teams. For example, consider the following history of games between
soccer national teams represented by a directed graph- an arrow from BRA to GER
BRA GER
TUN
ITA
SPA
JAP
In this scenario, JAP clearly looks like the weakest of the six teams depicted, but
it is less intuitive how the other teams are ranked, especially since different teams have
16
Chapter 2: Ranking Algorithms Andrei C. Grecu
played a different number of games. A starting point for comparison might be the
Using winning percentage as the ranking criterion, GER and SPA are tied for first
place. However, such a ranking does not take into account the quality of teams defeated
by each team Should GER and SPA get the same credit for defeating ITA and TUN,
respectively? In order to account for the strength of schedule of each team, we calculate
updated winning percentages using the defeated team’s winning percentage instead of a
0.500 0.667
winning percentage for GER is 0.389 , since GER played a total of three
3
games and beat ITA and SPA, whose winning percentages were 0.50, and 0.67,
respectively. Similarly, the updated winning percentage for SPA, which used to be tied
(0.500 0.500)
with GER, is now 0.333 . With the updated winning percentages, GER
3
17
Chapter 2: Ranking Algorithms Andrei C. Grecu
better ranking, based upon already updated winning percentages for each team. With the
new percentages, BRA is now ranked in first place! However, if we keep updating the
winning percentages following the process described above, the rankings eventually
In other words, BRA gets the first place because its victory came against a very
strong GER, while GER’s two victories came against relatively weaker ITA and SPA.
Also, even though ITA and SPA have the same number of victories as GER, half their
victories came against the weak teams TUN and JAP, which in turn lowered their own
ranking. Thus, using a reasonably intuitive algorithm, we were able to rank the teams
according to their winning percentages adjusted for the relative strength of their
schedules.
meaning that not all teams play each other. Let ni be the number of games played by
participant i, and let aij be some nonnegative number assigned to each team, depending on
the outcome of the game between participant i and participant j. Now, if we assume that r
18
Chapter 2: Ranking Algorithms Andrei C. Grecu
is a vector of ranking values, with positive component rj indicating the strength of the jth
1 N
si * aij * rj
ni j 1
The division by ni prevents teams from accumulating a large score just by playing
extra games. Also, the matrix A with entries aij is often called a preference or dominance
matrix, since it contains the scores assigned to each team based on its previous
interactions with other teams. If we further assume that the rank of a team is proportional
to its score, then the ranking vector r has to be a positive eigenvector of the positive
matrix A:
A* r * r
entries, it is easy to check that A*r0 is the column vector corresponding to the winning
percentages of each team, A2*r0 gives the average winning percentage of all defeated
teams, and so on. The solution that we are looking for is the limit, lim (An*r0). However,
n
the product An*r0 gets very small as n tends to infinity, so we use the power method to
19
Chapter 2: Ranking Algorithms Andrei C. Grecu
find the ranking vector r, which is the eigenvector corresponding to the largest
eigenvalue of A:
An * r0
r lim n
n | A * r0 |
The Perron-Frobenius theorem tells us when this limit exists and gives a unique,
matrix A is irreducible, the eigenvector r has strictly positive entries, is unique and
simple, and the corresponding eigenvalue if the largest eigenvalue of A in absolute value.
teams into two sets S and T such that no team in S has played any team in T, or every
game between a team from S and a team from T resulted in a victory for the team in S. In
other words, we need all teams to be connected by previous games, and we need a cycle
in the directed graph- we need a sequence of distinct teams t1, t2, t3, …, tk such that t1 beat
t2, t2 beat t3, …, and tk beat t1. In particular, for the preference matrix to be irreducible,
there can be no winless teams. When these conditions are satisfied, the limit
An * r 0
r lim converges to the unique positive eigenvector of A, which gives a
n | An * r 0 |
20
Chapter 2: Ranking Algorithms Andrei C. Grecu
Using the preference matrix A to find the ranking vector of teams has sound
mathematical foundations and effectively takes into account the strength of schedule of
each team when rankings the teams. However, the weakness of this method comes from
the subjective choice of the score aij for team i, following a game between team i and
team j. A scheme that assigns a score of 1 for a victory, 0.5 for a tie, and 0 for a loss, is
the natural choice, since in this case A*r0 gives the winning percentages of the teams, and
A2*r0 gives the average winning percentage of all defeated teams, thus containing
information regarding the strength of schedule. In particular, this scheme works well
when teams play each other frequently, thus making aij a better indicator of the
comparative strength of the two teams. However, when interactions between teams are
relatively rare or even reduced to one game- as is often the case with soccer national
teams, this simple scheme ineffectually gives all of the credit for the win to the winner,
while the loser gets a score of zero, regardless of the degree of its defeat.
In order to avoid lopsided splits of the merit for a victory between the two teams,
I implement a formula that assigns both teams a score of 0.5 before the start of the game,
and then updates the scores, as a function of the number of goals scored by each team:
Ycf Gij
aij
2 * Ycf Gij G ji
Where:
21
Chapter 2: Ranking Algorithms Andrei C. Grecu
In case of a tie, Gij= Gji, this scheme assigns each team a score of 0.5. Then, the
more convincing the victory, the closer the winner’s score gets to 1 and the loser’s score
year coefficient Ycf, this scheme puts a lot of emphasis on games played in recent years
and decreasing weights on games played a long time ago. For example, a 3-1 victory of
1 3
team i over team j brings team i aij= 0.667 points for a game played in 2006,
2 3 1
12 3
but only aij= 0.536 points for a games back in 1994. By assigning the
2*12 3 1
winning team two thirds of the one point per game in 2006, but only slightly more than
the initial half-half split in 1994, this scheme clearly rewards current success more than
past results.
In order to rank the teams that qualified to the 2006 soccer World Cup, I applied
the algorithm described above to 477 games among the 55 national teams that took part
in at least one World Cup between 1994 and 2006. Importantly, all 477 games took place
during a major tournament, under conditions somehow similar to the World Cup. First,
teams had a great incentive to win the game and advance to the next phase of the
tournament, thus playing its best available players at full capacity. Second, games took
place on neutral territory, so that no teams (other than the nation organizing the
Plugging the 477 games in Excel, and manipulating the data to assign a score to
all previous interactions using the scheme discussed in the previous section, I formed the
22
Chapter 2: Ranking Algorithms Andrei C. Grecu
An * r 0
dominance matrix A. Using MATLAB to find the eigenvector r lim n ,I
n | A * r 0 |
obtained the ranking of the 55 teams considered. Within the ranking of the 55 teams, I
identify the teams that qualified for the 2006 World Cup in Germany, and I scale the
1
Australia and Ukraine did not participate in any of the 27 major tournaments considered, so they were not
among the 55 teams ranked. Consequently, I arbitrarily assumed that Australia and Ukraine take the value
of the last competitive team that they defeated: Australia defeated Uruguay in the playoffs for the 2006
World Cup, and Ukraine defeated Turkey in the 2nd European qualifying group. Therefore, I assigned
Australia the value of Uruguay, and Ukraine the value of Turkey.
23
Chapter 2: Ranking Algorithms Andrei C. Grecu
1 BRAZIL 100.00
2 ITALY 87.52
3 GERMANY 84.65
4 MEXICO 81.89
5 NETHERLAND 77.87
6 ARGENTINA 73.33
7 FRANCE 72.42
8 ENGLAND 68.29
9 SPAIN 65.46
10 PARAGUAY 64.55
11 SWEDEN 60.96
12 CROATIA 60.78
13 PORTUGAL 58.53
14 USA 57.15
15 SOUTH KOREA 52.21
16 AUSTRALIA 48.15
17 UKRAINE 43.76
18 SAUDI ARABIA 42.09
19 COSTA RICA 40.89
20 ECUADOR 39.44
21 TUNISIA 36.79
22 CZECH REPUBLIC 35.81
23 JAPAN 35.63
24 SWITZERLAND 33.49
25 SERBIA AND MONTENEGRO 23.11
26 IRAN 20.97
27 GHANA 17.78
28 IVORY COAST 15.20
29 TRINIDAD AND TOBAGO 13.68
30 POLAND 10.09
31 ANGOLA 8.16
32 TOGO 7.33
24
Chapter 2: Ranking Algorithms Andrei C. Grecu
The Intuition
Soccer fans are renowned for the fanatic love and loyalty to their team. However,
for the sake of this algorithm, we need to consider a set of N perpetually vacillating
soccer supporters. Each of these N supporters gets a single vote to designate his or her
favorite team out of the 32 teams qualified for the soccer World Cup. However, over time
each supporter changes her favorite team according to the following rule:
1. She recalls the win-loss outcome of a single game played by her favorite team
3. Completely ignoring her current favorite, she goes with the winner of the
4. Returns to step 1
coins to decide which team to vote for, supporters will perpetually change their mind
regarding their favorite team. Indeed, at the microscopic level voters act as perpetual
random walkers on a network whose nodes are defined by soccer teams, and whose
connections are defined by previous games between the teams. However, even though
each individual voter is a random walker, at a macroscopic level the total number of votes
cast for each team stabilizes over time. Thereafter, we are able to rank the teams
The main appeal of this ranking scheme is its simplicity. The only subjective
input for the algorithm is the weight of the coin flipped by the soccer fans- the probability
25
Chapter 2: Ranking Algorithms Andrei C. Grecu
with which they go with the winner of the game they consider. In order to make the
algorithm reasonable, this probability must lie within the interval (0.5, 1), so that the
supporter’s vote goes for the winner, rather than with the loser of the game she consider.
In particular, a coin weight close to the p= 0.5 limit does not guarantee a vote in case of a
victory, but rather rewards the strength of schedule of each team. On the other hand, a
coin weight close to the p= 1 limit almost guarantees a vote in case of a victory, therefore
favoring teams with an undefeated record. With these considerations in mind, I will let
voters in my model go with the winner of the game with the mid-value probability p=
0.75, so that the algorithm equally emphasizes the strength of schedule and the winning
meaning that not all teams play each other. For each team i, let ni be the total number of
games played, wi the number of wins, and li the number of losses. Because soccer allows
tied games, we treat a tie as half a win and half a loss, so that ni = wi + li stays true. Also,
consider V voters, with vi voters casting their single vote to team i, so that even though
voters change their preferences, the total number of voters remains constant, v
i
i V .
At the beginning of the algorithm each voter is randomly assigned a favorite team
out of the N teams to be ranked. Then each of the N voters randomly picks a previous
game played by his favorite team and, completely ignoring his current team preference,
he casts his vote to the winner of that game with probability p, and goes with the loser
with probability 1- p.
26
Chapter 2: Ranking Algorithms Andrei C. Grecu
probability of choosing a given game inversely proportional to the number of years since
1
it took place. In order to do this I assign each game the value , where Yk is the number
Yk
of years since the game took place, and I recalculate the weighted sums for the number of
games, wins, and losses for each team. For example, assuming that team i played n
games, won w of them, lost l of them, and tied in t of them, I calculate the discounted
number of games, ni, wins, wi, and loses, li, for team i by summing the discounted value
of each separate game and by treating ties as half-wins and half-losses, so that I maintain
n
1
ni
k 1 Yk
w t
1 1
wi 0.5*
k 1 Yk k 1 Yk
l t
1 1
li 0.5*
k 1 Yk k 1 Yk
Where:
In order to avoid rewarding teams for playing more games, I set the rate at which
a voter considers a game played by his favored team i to be independent of the number ni
of games played by the team. With this choice of constant rates, the expected rate of
27
Chapter 2: Ranking Algorithms Andrei C. Grecu
change for the number of votes cast for each team in the random walk is characterized by
V’ = G * V
Where:
V is the column vector of the number of votes vi cast for each of the N teams
G is a square matrix whose entries are derived from previous games such that:
Gii p * li (1 p ) * wi
2* p 1
Gij 0.5* Nij * Aij , i j
2
Where:
With this choice of matrix G, which encompasses all the outcomes of previous
games between all teams, I am interested in the steady-state equilibrium that gives the
G*V=O
This equilibrium equation has a unique solution V for any given p in the (0.5,1)
interval. Indeed, with p strictly greater than 0.5, p > 0.5, the off-diagonal elements
2 * p 1
Gij 0.5* N ij * Aij , i j of the matrix G are non-negative. If, in addition, the
2
28
Chapter 2: Ranking Algorithms Andrei C. Grecu
connected component, then V is the unique equilibrium solution, lies in the null-space of
G and therefore is the eigenvector associated with the zero eigenvalue. Even though the
equilibrium V does not imply constant flows of voters switching their preference from
team i to team j, it guarantees a constant number of random walkers voting for each team
at any time. Therefore, by reducing the matrix G to its row-reduced echelon form, we can
easily compute the expected number of voters supporting each team, and implicitly rank
In order to rank the teams that qualified for the 2006 soccer World Cup, I applied
the algorithm described above to the 477 games among the 55 national teams that took
part in at least one World Cup between 1994 and 2006. Using Excel to compute the
discounted number of games, wins, and loses for each team, I constructed the matrix G
used to find the steady-state equilibrium. Then using MATLAB to find the row-reduced
echelon form of G, I determined the relative strength of each of the 55 teams considered.
Choosing the 32 teams qualified for the 2006 World Cup out of the 55 teams, and scaling
29
Chapter 2: Ranking Algorithms Andrei C. Grecu
30
Chapter 2: Ranking Algorithms Andrei C. Grecu
matching and learning capabilities address problems otherwise difficult to solve using
processes that take place in the human brain, artificial neural networks “learn” from a
given data set, thus being able to develop a solution without needing a predefined
between inputs and outputs, artificial neural networks are based on a simple model of
elements: i) its processing elements analogous to the neurons in the neural networks, ii)
its connections among processing elements and their corresponding weights, which
contain the information stored in the network, and iii) its evolution algorithm, which
gives the manner in which the neural network searches and converges to a solution.
In an attempt to model the way in which the human brain processes visual data
and learns to recognize objects, psychologist Frank Rosenblatt designed the first artificial
neural network in 1958. Since then, artificial neural network have been applied in a
of neural networks is the rating of sport teams based on previous results, which I will
31
Chapter 2: Ranking Algorithms Andrei C. Grecu
The Intuition
Wilson (1995) discusses the use of a neural network to rank the NCAA Division
1-A college football teams. In his approach, the processing elements correspond to the
football teams to be ranked, with the value of each neuron representing the relative value
of one team. Also, connections between processing elements correspond to games played
between teams, with the weights of the connections being derived from the score of
previous encounters. Finally, the evolution of the neural network is characterized by the
transfer and summation functions: On one hand, the transfer function look at one game at
a time, takes as inputs the value of the opponent and the weight of the connection
between the two teams, and returns an updated value of the team as a result of that game.
On the other hand, the summation function averages the results of the transfer function
for each game, thus giving the updated value of the team. Eventually, the algorithm stops
when the updated values of all neurons stabilize over time, when a new iteration does not
Using the same setting, I look at the soccer World Cup and design an artificial
neural network that ranks the qualified teams based on their previous results. In order to
do this, I will change the approach presented in Wilson (1995) in two important ways.
factor in both the score and the date of the game, thus putting decreasing emphasis on
games that took place longer time ago. Second, I will implement a soccer-intuitive
transfer function, which updates the values of processing elements (teams) based on the
32
Chapter 2: Ranking Algorithms Andrei C. Grecu
Consider the following history of games between soccer national teams, in which
the arrow from GER to USA means that team GER beat team USA, and WGER,USA is a
weight that increases with the difference in goals scored by GER and USA, and decreases
WSPA,GER WUSA,JAP
WUSA,SPA WGER,JAP
SPA JAP
updates the value assigned to each team at time t based on the team values at time t-1, as
well as the connection weights, which remain constant throughout the algorithm. For the
situation pictured in Figure 3, the following updates are performed at each iteration, until
the value assigned to each team does not change between incremental units of time:
33
Chapter 2: Ranking Algorithms Andrei C. Grecu
FT (Vt 1, USA, WGER , USA) FT (Vt 1, JAP, WGER , JAP) FT (Vt 1, SPA, WSPA, GER )
Vt , GER
3
FT (Vt 1, GER, WGER, USA) FT (Vt 1, JAP, WUSA, JAP) FT (Vt 1, SPA, WUSA, SPA)
Vt , USA
3
Where:
following a victory, ii) assign more value to a victory against a strong opponent than
against a weaker opponent, iii) assign more value to a recent victory at a high score than
to a close victory a while ago; iv) decrease the value of a team following a defeat, v)
decrease more value following a defeat against a weak opponent than against a stronger
opponent, and finally vi) decrease more value for a recent defeat at a high score than for a
close defeat a while ago. Also intuitively, the initial value assigned to each team should
not influence the final rankings. Thus, in order to avoid any bias resulting from the initial
value assigned to each team, I assign all teams the same initial value and let the
connection weights be the only factors determining the relative ranking of teams. With
34
Chapter 2: Ranking Algorithms Andrei C. Grecu
these considerations in mind, I implement the following mathematical model for a neural
network that ranks the teams qualified for the World Cup.
Consider N teams with a history of games among themselves, such that every
team is connected to all other teams either through direct games or through a succession
network with N neurons, such that each team is assigned a neuron in the network. Using
the results of previous encounters among the N teams over the last 12 years, we compute
the weights of all connections between team i and team j, such that clear, recent results
are weighted more heavily than tight games, which took place longer ago:
Where:
g ij is the difference between the number of goals scored by team i and team j
Y is a year coefficient equal to (12 - number of years since the game took place)
ij
Given the artificial neural network and the weights described above, we need to
assign each team an initial value, before starting the evolution algorithm. As discussed in
the previous section, we want the relative values of the teams to be derived solely from
the connection weights, rather than being influenced by the initial values assigned to the
teams. Therefore, in order to reduce the bias resulting from arbitrary initial values, we
35
Chapter 2: Ranking Algorithms Andrei C. Grecu
assign all teams an initial value of 50, and we implement an evolution algorithm that uses
At the heart of the evolution algorithm is the transfer function, which updates the
value of each team based on the value of the opponent and the weight of the connection
between the two teams. Intuitively, we want the transfer function to always increase the
value of a team following a victory and decrease its value following a defeat. However,
we want these changes to vary according to the strength of the opponent, the magnitude
of the victory, and the number of years since the game took place. An intuitive transfer
Figure 4: The value of team i can increase more following a victory against a strong
Consider the case in which team i beat team j, so that the value of team i rises
from Vi,t, at time t, to Vi,t+1, at time t+1. At this point we model a transfer function that
performs two steps in updating the value of team i: i) first, it computes the range of
value Vj,t, and then ii) it determines the exact updated value Vi,t+1 (minVi,t+1, maxVi,t+1),
by looking at the connection weight Wij. Such a transfer function generates the greatest
increase in a team’s value following a recent, clear victory against a strong opponent, and
36
Chapter 2: Ranking Algorithms Andrei C. Grecu
causes the smallest increase in value following a tight victory against a weak opponent,
First, in determining (minVi, t+1, maxVi, t+1), assume that minVi, t+1 = Vi, t, or the
“worst” a team can do in case of a victory is keep its previous value. Meanwhile, assume
that maxVi,t+1, or the maximum possible increase in the value of team i, is linearly
dependent on the value of the opponent team, Vj,t. Since the team values are bound to the
interval [0,100], consider the two limit cases. On one hand, if team i wins against a 100-
value team, its updated value Vi, t+1 should be allowed to potentially increase all the way
3 3
to of the distance between Vi, t and 100, namely to the point Vi + * (100 – Vi). On
4 4
the other hand, if team i wins against a 0-value team, regardless of the score and date, its
1
update value Vi, t+1 should not be allowed to increase by more than only of the distance
4
1
between Vi, t and 100, or the point Vi + * (100 – Vi). Using these two values as
4
reference, and assuming a linear relationship between the maximum possible increase in
the value of team i, maxVi,t+1, and the value of team j, Vj,t, we derive the formula for the
100 Vi ,t 100 3* Vi ,t
maxVivictory
,t 1 * V j ,t
200 4
updated values for team i, we look at the connection weight Wij to determine the exact
updated value for team i within the interval. For large values of Wij, corresponding to
recent, categorical victories, we want the transfer function to assign a big increase in the
37
Chapter 2: Ranking Algorithms Andrei C. Grecu
value of team i. Conversely, for small values of Wij, corresponding to close victories that
took place a while ago, we want a smaller increase in the value of team i within the
interval (minVi,t+1, maxVi,t+1). Therefore, assume that the transfer function returns the
maximum updated value for team i, maxVi,t+1, following a game with weight Wmax, the
highest weight in the entire neural network. For all other connection weights smaller than
Wmax, the transfer function returns an update value for team i in the interval (minVi,t+1,
Wij
Vivictory
,t 1 Vi , t ,t 1 Vi , t )
*(maxVivictory
Wmax
Similarly, in a game in which team i lost to team j we want the value of team i to
decrease as a function of both the value of the opponent team Vj,t and the connection
weight Wij. Now, the “best” a loosing team can do is keep its current value, maxVi, t+1 =
Vi,t, in case it lost in a tight game, against a very strong team, and a long time ago. In the
general case, following a defeat, the updated value of team i will lie in the interval whose
upper limit is the previous value of the team, Vi,i, and whose lower limit is a linear
Vi ,t Vi ,t
,t 1
min Videfeat * V j ,t
200 4
Having computed the interval of possible updated values for team i, (minVi,t+1,
maxVi,t+1), we look at the connection weight Wij to determine the exact updated value for
team i within the interval. For large values of Wij, corresponding to recent, categorical
defeats, we want the transfer function to assign a big decrease in the value of team i.
38
Chapter 2: Ranking Algorithms Andrei C. Grecu
Conversely, for small values of Wij, corresponding to close defeats that took place a
while ago, we want a smaller decrease in the value of team i within the interval (minVi,t+1,
maxVi, t+1). Therefore, the transfer function, which returns the exact updated value of
Wij
,t 1 Vi , t
Videfeat ,t 1 Vi , t )
*(minVidefeat
Wmax
Finally, in case of a tie, we want to penalize the team with the higher value and
reward the team with the lower value, since the former was expected to win, while the
latter produced the surprise. However, since ties are only half-upsets, we only award half
the increase computed in case of a victory, and subtract half the value computed in case
of a defeat. Also, in a tie team i and team j score the same number of goals, so the
updates the team values as a function of the number or years since the game against team
j, Yij. Assuming that team i has a greater value than team j at time t, and supposing that
we are taking into account games at most 12 years ago, the transfer function increases the
victory
(maxVj,t+1 -2*Vj,t )
V tie
j ,t 1 Vj,t *Yji
24
defeat
(2 * minVi,t+1 -Vi,t )
V tie
i ,t 1 Vi,t * Yij
12
Using the transfer functions presented here, the evolution algorithm looks at all
the games played by team i, computes the updated value of team i corresponding to each
39
Chapter 2: Ranking Algorithms Andrei C. Grecu
game played, and then averages the separate values to return the overall update value of
team i. This process in repeated until the values of the teams stabilize between
incremental units of time. Finally, in order to avoid having very large or negative values
assigned to certain teams, we normalize the values assigned to each team after each
iteration, such that the highest ranked team has a value of 100 and all other teams have a
In order to rank the teams that participate in the 2006 World Cup I formed a
neural network whose neurons correspond to the 55 soccer national teams that qualified
for at least one World Cup between 1994 and 2006. Next, I determined the weights of the
intra-neural connections by examining 477 previous games among the 55 teams, played
either in previous World Cups or in competitive regional tournaments that replicate the
World Cup environment- neutral field, strong motivation. Using the C++ program
section to update the value of each team based on the value of the opponent and the
connection weight corresponding to each game, I obtained the convergent solution for the
2
Included in Appendix B is a graph that shows how the algorithm converges to stable values for each team
40
Chapter 2: Ranking Algorithms Andrei C. Grecu
1 BRAZIL 100.00
2 ITALY 93.32
3 FRANCE 85.65
4 ARGENTINA 84.22
5 ENGLAND 82.09
6 GERMANY 81.55
7 PORTUGAL 80.24
8 NETHERLAND 79.88
9 SPAIN 79.47
10 SWEDEN 77.87
11 CZECH REPUBLIC 77.66
12 MEXIC 76.20
13 AUSTRALIA 69.20
14 PARAGUAY 64.69
15 JAPAN 64.23
16 IRAN 63.48
17 IVORY COAST 61.98
18 YUGOSLAVIA 61.19
19 POLAND 61.08
20 TOGO 55.92
21 CROATIA 53.64
22 SOUTH KOREA 52.17
23 COSTA RICA 51.40
24 UKRAINE 50.18
25 GHANA 46.83
26 USA 45.23
27 TUNISIA 44.96
28 SAUDI ARABIA 43.93
29 TRINIDAD AND TOBAGO 28.58
30 SWITZERLAND 25.51
31 ECUADOR 19.72
32 ANGOLA 17.39
41
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
Chapter 2 presents three algorithms for ranking soccer national teams qualified
for the World Cup, based on historical games among the teams prior to the start of the
competition. Next, this chapter assesses the predictive power of the rankings developed in
the previous chapter by looking at the relationship between initial rankings and game
results in the case of the 2002 World Cup in South Korea and Japan. Thus, in order to
assess the predicting accuracy of the rankings, I will employ the ranking algorithms from
Chapter 2 using historical games available at the beginning of the 2002 World Cup.
Using the 2002 rankings, I will then look at the games from the 2002 World Cup and
examine how the value assigned to each team predicts the number of goals scored by that
team during the tournament. Implicitly, for every game I calculate the probability of
winning assigned to each team and I compare my predictions with the actual results from
South Korea and Japan. Finally, I explain how the structure of games from the World
Cup makes it difficult to compute conditional probabilities for each team to win entire
tournament, which is why I choose to run the simulations of the World Cup in Chapter 4.
Before looking for a probability distribution for the number the goals scored in
the 2002 World Cup games, we need to determine the relative rankings of the teams as of
June 2002, the start date for the tournament. In order to rank the teams at the start of the
World Cup, we apply the algorithms discussed in Chapter 2 to a history of games played
42
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
among soccer national teams between 1990 and 2002. Thus, i) we put decreasing
emphasis on games that took place longer time ago, ii) we only consider competitive
soccer national teams that qualified for at least one World Cup between 1990 and 2002,
and iii) we only look at games that were part of a competitive tournament, in which teams
play their best players at full potential. More precisely, the dataset consists of 473 games
2. African Nations Cup: Mali 2002, Ghana 2000, Burkina Faso 1998, South
3. Asian Cup: Lebanon 2000, United Arab Emirates 1996, Japan 1992
4. CONCACAF Gold Cup: USA 2002, USA 2000, USA 1998, USA 1996,
5. Copa America: Colombia 2001, Paraguay 1999, Bolivia 1997, Uruguay 1995,
1992
By applying the three ranking algorithms to this set of games, with their
corresponding dates and scores, I obtained the following rankings of soccer national
43
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
1 ITALY 100.00
2 ARGENTINA 95.66
3 GERMANY 92.36
4 BRAZIL 90.81
5 MEXICO 82.73
6 USA 76.02
7 ENGLAND 74.46
8 FRANCE 64.60
9 URUGUAY 62.42
10 CAMEROON 61.64
11 SPAIN 61.27
12 SWEDEN 60.79
13 PARAGUAY 54.63
14 BELGIUM 49.56
15 RUSSIA 47.92
16 DENMARK 46.81
17 COSTA RICA 45.92
18 NIGERIA 44.96
19 ECUADOR 44.48
20 SOUTH KOREA 42.81
21 CROATIA 39.88
22 PORTUGAL 34.62
23 IRELAND 31.84
24 SAUDI ARABIA 31.02
25 TUNISIA 28.65
26 SOUTH AFRICA 25.76
27 JAPAN 23.17
28 TURKEY 21.79
29 SENEGAL 12.75
30 SLOVENIA 8.78
31 CHINA 7.78
32 POLAND 7.00
44
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
1 FRANCE 100.00
2 PORTUGAL 82.90
3 ITALY 75.27
4 CROATIA 63.80
5 BRAZIL 59.04
6 GERMANY 54.69
7 ENGLAND 51.22
8 ARGENTINA 48.08
9 SPAIN 46.93
10 IRELAND 45.06
11 MEXIC 42.30
12 DENMARK 40.77
13 NIGERIA 40.63
14 CAMEROON 39.67
15 SENEGAL 39.42
16 USA 36.58
17 BELGIUM 36.44
18 SWEDEN 34.58
19 PARAGUAY 33.33
20 URUGUAY 32.84
21 TURKEY 32.37
22 RUSSIA 32.19
23 SLOVENIA 31.16
24 SOUTH AFRICA 30.81
25 JAPAN 26.20
26 ECUADOR 22.84
27 COSTA RICA 22.60
28 TUNISIA 21.40
29 SAUDI ARABIA 20.82
30 SOUTH KOREA 19.13
31 CHINA 10.53
32 POLAND 10.00
45
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
1 ITALY 100.00
2 PORTUGAL 96.20
3 FRANCE 94.56
4 BRAZIL 84.97
5 CROATIA 82.69
6 DENMARK 47.03
7 ENGLAND 46.11
8 NIGERIA 45.64
9 GERMANY 45.56
10 SPAIN 44.91
11 ARGENTINA 44.91
12 SOUTH AFRICA 37.88
13 CAMEROON 33.92
14 MEXIC 31.44
15 PARAGUAY 30.82
16 SLOVENIA 29.60
17 SWEDEN 28.87
18 TURKEY 26.81
19 URUGUAY 26.37
20 TUNISIA 25.26
21 SENEGAL 24.97
22 BELGIUM 23.87
23 JAPAN 23.41
24 RUSSIA 19.60
25 USA 19.56
26 IRELAND 19.16
27 ECUADOR 19.05
28 COSTA RICA 18.74
29 SOUTH KOREA 18.33
30 SAUDI ARABIA 18.22
31 CHINA 2.57
32 POLAND 2.00
46
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
In a typical soccer game two teams play in continuous time for 90 minutes3, with
the team that scores more goals winning the game. In order to score a goal, the two teams
alternate possession of the ball, which allows them to attack the opponent team’s goal
and perhaps score. If attacks are assumed to be independent, then the distribution of goals
scored is negative binomial, as claimed in Pollard (1977), Moroney (1951), and Reed,
Pollard, and Benjamin (1971). However, the probability p that any attack will result in a
goal is relatively small. For example, a total of 161 goals were scored in the 64 games
from the 2002 World Cup, for an average of approximately 2.5 goals per game or one
goal every 40 minutes. Consequently, even thought there are a lot of attacks in a game,
there is a small probability p of scoring in any given attack. Therefore, given the small
probabilities of success p, the Poisson approximation is a good fit for the number of goals
scored in a soccer game, as showed in Lee (1997), Maher (1982), and Dyte and Clarke
(2000).
Using an approach similar to Dyte and Clarke (2000), my model for the number
of goals scored by each team in a given game relies on two assumptions. First, it assumes
that the number of goals scored by each team in a game is Poisson distributed. Second, it
assumes that the number of goals scored by a team is independent of the number of goals
scored by the opposing team. Given these two assumptions, I am interested in measuring
the rankings’ predictive power with respect to the number of goals scored by team i in a
3
59 out of the 64 games played in the 2002 World Cup ended after 90 minutes. Thus, even though some
games from the knockout stage of the World Cup go into extra time to allow teams to score the winning
goal, I will focus my analysis on results after 90 minutes of play.
47
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
ln( gij ) x0 x1 * Ri x2 * R j
Where:
Having agreed on the model, I looked at the results from the games played in the
2002 World Cup. Even though only 64 games were played in the tournament, they
correspond to 128 observations, since for every game we are interested in predicting the
number of goals scored by each team. Using MATLAB to fit a Poisson regression to the
data, I obtained the following sets of coefficients, corresponding to each of the three
rankings developed:
1. Eigenvector Ranking:
48
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
All three regressions fit the data well, and give a positive coefficient in front of Ri,
the rating of team i, and negative coefficient in front of Rj, the rating of the opponent
team j. These results confirm the basic intuition, which says that the higher the rating of
team i, and the lower the ranking of team j, the higher the expected number of goals
scored by team i. Also, the negative coefficients in front of Rj are significantly larger in
absolute terms than the positive coefficients in front of Ri for all three regressions,
suggesting that in determining the number of goals scored by a team, the rating of the
opponent is more important than the team’s own ranking, at least in the 2002 World Cup.
Using the regression coefficients to compute the expected number of goals scored
by a team in a certain game and then using that expectation as a mean, we can compute
marginal probabilities for each team’s Poisson distribution of goals scored in a certain
game. If we further assume that the number of goals scored by team i is independent of
the number of goals scored by team j, we can compute the probability of any specific
i exp( x0 x1 * Ri x2 * R j )
j exp( x0 x1 * R j x2 * Ri )
49
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
g j
i ij * e i j ji * e
g
P( gij & g ji ) *
gij ! g ji !
As an example, consider the game between Argentina and Nigeria from the 2002
World Cup. The Eigenvector ratings computed at the beginning of the tournament for the
two teams are RARG = 95.66 and RNIG = 61.64. Using these ratings, we compute the
Thus, before the game we expected Argentina to score 1.46 goals and Nigeria
only 0.79 goals in their direct game. Using these expectations as means, we can compute
the probability assigned to each score in the game between Argentina and Nigeria, as
long as we assume that the number of goals scored by each team is Poisson distributed
and the number of goals scored by Argentina is independent of the number of goals
scored by Nigeria:
ARG
g ARG
* e ARG NIG
g NIG
* e NIG
P (1-0 Argentina win) *
g ARG ! g NIG !
1.46* e 1.46 * e 0.79
0.149
similar computations, we can compute the probability assigned to any score in the game
50
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
between Argentina and Nigeria. The table below contains the probabilities assigned to
NIG
ARG 0 1 2 3 4 5 6 7 8 9
0 0.0853 0.0607 0.0216 0.0051 0.0009 0.0001 0.0000 0.0000 0.0000 0.0000
1 0.1493 0.1062 0.0378 0.0090 0.0016 0.0002 0.0000 0.0000 0.0000 0.0000
2 0.1306 0.0929 0.0331 0.0078 0.0014 0.0002 0.0000 0.0000 0.0000 0.0000
3 0.0762 0.0542 0.0193 0.0046 0.0008 0.0001 0.0000 0.0000 0.0000 0.0000
4 0.0333 0.0237 0.0084 0.0020 0.0004 0.0001 0.0000 0.0000 0.0000 0.0000
5 0.0117 0.0083 0.0030 0.0007 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000
6 0.0034 0.0024 0.0009 0.0002 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
7 0.0009 0.0006 0.0002 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
8 0.0002 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
9 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
In this example, it happens to be that the score with the highest probability
(14.93%), 1-0 for Argentina, was the real result of the game between the two teams.
However, given the relatively small probability assigned to each separate result, it does
not happen very often that the result with the highest probability is the real result of the
game. A more meaningful prediction regarding the game between Argentina and Nigeria
would be the probability assigned to a victory of Argentina against Nigeria, at any score.
We are able to compute this probability by summing all the probabilities below the main
diagonal- the probabilities assigned to all outcomes in which Argentina scores at least
one goal more than Nigeria. Similarly, we compute the probability of a Nigeria victory by
summing the probabilities above the main diagonal. Finally, the sum of the probabilities
on the main diagonal gives the probability of a draw. In the case of the game between
51
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
Argentina and Nigeria, these aggregate probabilities were: Argentina wins 62.30%,
Using the methodology discussed above, I compute three sets of predictions for
the 2002 World Cup games, each corresponding to one of the three rankings presented in
this thesis: the Eigenvector ranking, the Random Walker ranking, and the Neural
Network ranking. Then, by looking at the actual results of the games from the 2002
given the relative frequency of unexpected results in the soccer World Cup, any initial
the outcome of World Cup games. Naturally, I decided to compare my predictions with
the predictions implied by the odds for winning the World Cup assigned to each team by
the sports bookies. More exactly, I assumed that whenever a team with higher odds for
the World Cup plays a team with lower such odds, the former team is the bookies’
favorite.
Below are the odds for winning the 2002 World Cup assigned to each team by the
London bookmakers, as published in The London Times on the 31st of May, 2002, the
52
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
53
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
the 64 games from the 2002 World Cup and I reward the predictions that turned out to be
correct, while I penalize the predictions that turned out to be wrong. Specifically, I assign
a score of –1 to any game in which a team with smaller winning probability defeated a
team with higher winning probability, since this disagrees with the predictions. Likewise,
I assign a score of +1 to any game won by the team with higher winning probability,
since this agrees with the predictions. Intuitively, a tie is worth 0, since the team with
higher winning probability failed to win the game, but it did not actually lose to the
underdog, either.
Also, we define the predictive score of a set of predictions as the sum of the
separate scores assigned to each game, given that set of predictions. The higher the
predictive score, the more accurate the predictions are, since we have decided to award a
point for every correct forecast and subtract one point for every erroneous prediction. For
example, using the predictions derived from the London Times rankings and looking at
the 2002 World Cup results, we conclude that the favorite team actually won the game in
32 out of the 64 games, the underdog produced the surprise and won in 18 games, while
14 games ended in a tie. Thus, with 32 correct predictions, 18 wrong ones, and 14 ties,
the London Times set of predictions gets a predictive score equal to 32*1 – 18*(-1) +
14*0 = 14.
Similarly, we compute the predictive score of the three sets of predictions derived
from my rankings. Using the Eigenvector set of predictions we are able to correctly
predict the winner of 35 games, while we are wrong for 15 games, for a predictive score
of 35*1 + 15*(-1) = 20. Using the Random Walkers set of predictions we again correctly
54
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
predict the winner for 35 of the games, while we are wrong in 15 cases, for a predictive
score of 35*1 + 15*(-1) = 20. Finally, with the Neural Network set of predictions we are
right in predicting the winner of 33 games, while we are mistaken in our prediction for 17
predictions in picking the winner of separate World Cup games. In other words, if I had
chosen the winner of each game according to my rankings, I would have done better than
if I had chosen the winner of each game by looking in the London Times and picking the
team with the higher assigned odds for winning the World Cup.
55
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
Table 2: For each of the 64 games from the 2002 World Cup, the three sets of
Score of 1 means the prediction was right , a –1 means it was wrong; 0 is a tie )
56
Chapter 3: A Poisson Model for World Cup Games Andrei C. Grecu
ARG SWE 1 1 53% 20% 26% 0 44% 29% 27% 0 43% 30% 27% 0 0
NIG ENG 0 0 22% 52% 26% 0 30% 42% 28% 0 36% 36% 28% 0 0
CRO MEX 0 1 17% 59% 24% 1 47% 24% 28% -1 55% 19% 26% -1 -1
ITA ECU 2 0 65% 13% 22% 1 66% 12% 21% 1 66% 12% 21% 1 1
ITA CRO 1 2 67% 12% 21% -1 39% 28% 33% -1 40% 28% 32% -1 -1
ECU MEX 1 2 19% 56% 25% 1 26% 49% 25% 1 32% 42% 26% 1 1
ECU CRO 1 0 39% 34% 27% 1 16% 61% 23% -1 16% 61% 23% -1 -1
ITA MEX 1 1 43% 27% 29% 0 53% 19% 28% 0 61% 15% 24% 0 0
JAP BEL 2 2 24% 51% 25% 0 31% 43% 26% 0 37% 37% 26% 0 0
RUS TUN 2 0 47% 27% 26% 1 44% 31% 25% 1 35% 39% 26% -1 1
JAP RUS 1 0 24% 50% 25% -1 34% 41% 26% -1 39% 35% 26% 1 -1
BEL TUN 1 1 48% 26% 26% 0 47% 28% 25% 0 36% 37% 26% 0 0
BEL RUS 3 2 37% 35% 28% 1 39% 34% 26% 1 39% 35% 26% 1 -1
JAP TUN 2 0 34% 40% 26% -1 41% 35% 25% 1 36% 38% 26% -1 1
GER PAR 1 0 55% 19% 26% 1 49% 25% 27% 1 42% 31% 27% 1 1
DEN ENG 0 3 23% 51% 26% 1 30% 42% 28% 1 36% 36% 28% -1 1
SWE SEN 1 2 63% 15% 21% -1 34% 39% 27% 1 38% 35% 26% -1 -1
SPA IRE 1 1 52% 22% 25% 0 37% 35% 29% 0 47% 27% 26% 0 0
MEX USA 0 2 39% 32% 29% -1 40% 33% 27% -1 42% 32% 26% -1 -1
BRA BEL 2 0 57% 18% 25% 1 49% 24% 27% 1 59% 17% 24% 1 1
JAP TUR 0 1 38% 36% 26% -1 33% 41% 26% 1 35% 38% 26% 1 -1
SKO ITA 2 1 13% 66% 22% -1 11% 69% 20% -1 12% 67% 21% -1 -1
ENG BRA 1 2 28% 43% 29% 1 31% 39% 30% 1 23% 50% 28% 1 1
GER USA 1 0 43% 28% 29% 1 46% 26% 27% 1 47% 27% 26% 1 1
SKO SPA 0 0 27% 46% 27% 0 22% 55% 24% 0 27% 47% 26% 0 0
SEN TUR 0 1 32% 42% 26% 1 41% 32% 27% -1 36% 38% 26% 1 1
SKO GER 0 1 15% 62% 23% 1 18% 59% 23% 1 27% 48% 26% 1 1
BRA TUR 1 0 73% 10% 18% 1 52% 22% 26% 1 58% 17% 25% 1 1
SKO TUR 2 3 48% 26% 26% -1 29% 46% 25% 1 34% 40% 26% 1 1
BRA GER 2 0 34% 36% 30% -1 37% 32% 31% 1 50% 22% 28% 1 1
SCORES: 20 20 16 14
57
Chapter 4: Simulating the Soccer World Cup Andrei C. Grecu
Chapter 3 showed how the results of the ranking algorithms from Chapter 2 could
be used to make predictions regarding the outcome of separate games from the World
Cup. Moreover, we have seen that for the 2002 World Cup games, picking winners using
the three ranking methods outperformed the strategy of always going with the
In this chapter we are going to shift our focus from separate World Cup games to
the overall picture and determine the probability of winning the Cup assigned to each
participating team. In particular, how is the probability of winning assigned to each team
influenced by the particular schedule of games from the World Cup tournament? How
does the initial draw advantage some teams, while disadvantaging other participants?
Finally, which teams had a lucky draw for the World Cup final tournament and which
teams were assigned the most difficult schedule? Given the structure of games in the
World Cup, it turns out to be easier to answer these questions by performing a simulation
of the games from the tournament than by explicitly calculating conditional probabilities
The soccer World Cup has a complex, two-phase structure. Initially, the 32
qualified teams are divided into eight groups of four. Even though this allocation is based
upon a draw, teams are also divided into four value-pools according to their previous
58
Chapter 4: Simulating the Soccer World Cup Andrei C. Grecu
international results, and each group is restricted to exactly one team from each value-
pool. Theoretically, this structure advantages the highest ranked teams, which are seeded
such that they play lower ranked teams in the group stage. However, teams that
participate in the World Cup are of comparable value and during the six round robin
games played in each group, teams have three games to demonstrate their superiority
over the other teams from the group. At the end of the group games, the first criterion for
ranking the teams is the number of points achieved by each team in the three group
games; in case of a tie, the next criterion used to differentiate between teams is the goal
difference record of each team.4Given the final ranking, the top two teams from each
group advance to the second round of the competition, which consists of a simple 16-
team knockout arrangement. Moreover, the entire structure of games of the knockout
stage is predetermined, such that the winner of group A plays the runner up of group B,
the runner up of group C plays the winner of group D, and so on all the way to the final.
This particular structure essentially splits the teams in two different halves, such that
teams from one half will not play teams from the other half until the final of the World
The tree structure that describes the schedule of games from the knockout stage of
the World Cup tournament is depicted below. Since 48 games are played in the group
stage, the figure labels games G49 to G62, leading all the way to the final:
4
It very rarely happens that these two criteria are not sufficient for ranking the teams, but other criteria for
differentiating exist, such as the number of red/yellow cards received by each team, or the official
international ranking of the teams at the time of the play.
59
Chapter 4: Simulating the Soccer World Cup Andrei C. Grecu
WA G49 G51 WB
W49 W51
RB RA
G57 G59
W57 W59
WD
WC G50 G52
W50 W62 G62 W52 RC
RD
FINAL
WE WF
G53 G61 G55
W53 W61 W55
RF RE
G58 G60
W58 W60
WG WH
G54 G56
W54 W56
RH RG
Figure 5: The tree structure describing the games from the World Cup tournament. E.g.:
The winner of group A (WA) plays the runner-up of group B (RB) in game G49
Cup for each participating team. However, even if we calculated conditional probabilities
involving winning probabilities in games against all other 31 teams from the World Cup,
we would still run into difficulties when ranking teams after the group stage games, since
goal difference required for tie-breaking make the exact score a requirement. Therefore, I
choose to simulate the games from the World Cup using a method inspired from
60
Chapter 4: Simulating the Soccer World Cup Andrei C. Grecu
Assume that at the beginning of the World Cup the value of team i is Vi, the
corresponding value from the Eigenvector rankings. This simulation models the outcome
of a game between team i and team j by generating two numbers from two normal
distributions with equal variance σ2: the first number Pi is drawn from the distribution
N(Vi, σ2) and characterizes team i’s performance in the game; the second number Pj is
drawn from the distribution N(Vj, σ2) and characterize team j’s performance in the game.
Given these two numbers generated from N(Vi, σ2) and N(Vj, σ2), the score Sij of the
The equal variance σ of the two distributions determines how often will the
sample from the population with the larger mean be lower than the sample from the
population with the smaller mean. This probability is particularly important for our
interpretation of the model, since a negative score Sij = Pi – Pj < 0 for Vi > Vj translates
into a “surprise”, or a game in which the team with lower value Vj defeated the team with
higher value Vi. Therefore, for all the 48 games from the group stage, I look at the 48
values of the “favorite” team in each game, Vf, and I look at the 48 values of the
“underdog” team in each game, Vu. The Central Limit Theorem tells us that Vf Vu has
Therefore, I compute the mean and variance of the two sample sizes, the “favorites” and
the “underdogs”, and I determine the variance σ2 required to make P (Vf – Vu > 0) = 0.75,
assuming that 25% of the games in the World Cup are upsets.
61
Chapter 4: Simulating the Soccer World Cup Andrei C. Grecu
Table 3: Mean and variance for the groups of teams with higher value and lower
value, respectively, before the 48 games from the group stage of the World Cup
Thus for σ2 = 58, this simulation model will produce an “upset”- a situation in
P
which given Vi > Vj, the returned sample P , with probability 0.25.
i j
Using the model and the parameters described above, I simulate the games from
the 2002 World Cup. First, I simulate the 6 games from each group and for each team I
aggregate the three scores corresponding to its games. Then I rank the teams according to
their aggregate scores and, having obtained the top two teams in each group, I simulate
the predefined schedule of games until I get the winner of the World Cup. I repeat the
simulation 10,000 times and I count the number of times each team won the World Cup,
thus determining the probability of winning the World Cup for each team.
Having computed the probability for winning the World Cup for each team, we
want to determine which teams were advantaged, and which teams were disadvantaged
by the World Cup draw. It is generally agreed upon the fact that a Round Robin
tournament, in which each team plays every other team, gives a fair ranking of the teams.
Therefore, I also simulate a Round Robin alternative to the World Cup. I only run the
62
Chapter 4: Simulating the Soccer World Cup Andrei C. Grecu
Round Robin simulation 1000 times, since every tournament takes 992 games, as
opposed to only 64 in the case of the World Cup, and I compute the probability of
winning the Round Robin tournament for each team. Then by comparing the results of
the World Cup simulatiuon with the results of the Round Robin simulation, I can
determine which teams were mostly advantages or disadvantaged by the World Cup
draw. Here are the results of the 2002 World Cup and Round Robin simulations- apart
from Italy, Brazil shows the greatest World Cup advantage, or difference between its
winning probabilities for the World Cup and for the Round Robin tournament, which
might partially explain their successful advancement all the way to the final and to
63
Chapter 4: Simulating the Soccer World Cup Andrei C. Grecu
Running the simulation for the 2006 World Cup shows Brazil as the big favorite
to win the World Cup, having the highest rating in both tournaments, as well as the
highest World Cup advantage, or increase from the Round Robin to the World Cup
64
Chapter 4: Simulating the Soccer World Cu Andrei C. Grecu
65
Chapter 5: Conclusion Andrei C. Grecu
Chapter 5: Conclusion
This thesis proposes a new approach to ranking the teams that qualify for the
soccer World Cup. In essence, it claims that the quality of soccer teams is different on
different continents and therefore results in regional qualifying tournaments, against less
competitive teams, are not so relevant to the present value of the teams. Instead, it looks
three algorithms that take into account the strengths of the opponents encountered in the
Chapter 2 lays the foundation of the thesis by presenting and then implementing
three algorithms for ranking teams in uneven paired competitions. The three algorithms
use different mathematical tools to rank the teams. First, a matrix-based method of
ranking takes as input previous interactions among teams and returns an eigenvector with
the relative value assigned to each team. Second, a random walker algorithm looks at the
mind regarding their favorite team, thus executing random walks on a network defined by
the participating teams and their previous interactions. Third, a biologically inspired
neural network algorithm constructs a neural network whose nodes are the participating
teams and whose connections are determined by previous interactions among the teams,
and uses a soccer-intuitive transfer function to update the value of each node until a
steady state solution is reached. Although very different in their approach, all three
66
Chapter 5: Conclusion Andrei C. Grecu
Chapter 3 contains the most meaningful results of this thesis. Looking four years
back at the 2002 World Cup in South Korea and Japan, and assuming a Poisson
distribution of goals in a World Cup game, a nonlinear regression for the number of goals
scored in each separate game from the 2002 World Cup is fit, using the rankings
presented above as predictive variables. Using the result of the regression, we derive
predictions regarding the outcome of each game from the 2002 World Cup. When
comparing predictions with results, it turns out that a strategy that consistently picks the
winner of World Cup games using my predictions is more accurate that a strategy that
always picks the favorite implied by the odds offered by the London bookies.
Finally, Chapter 4 determines the probabilities for winning the World Cup for
each team by simulating the predefined structure of games from the World Cup. Also, by
comparing the results of the World Cup simulation to the results of a Round Robin
As far as I know, this is the fist work that draws a parallel between the challenge
of ranking the teams that participate in the soccer World Cup, and the challenge faced
every year by the Bowl Championship Series (BCS) in ranking American college
football. The two tasks are similar in that the number of games played by every team is
relatively small, teams play many more games within their regional league than against
teams in other leagues, and the quality of the opponents varies from region to region.
This thesis modified some of the methods currently used to rank football teams, so that
they rank the soccer teams from the World Cup instead. It is my hope that further
67
Chapter 5: Conclusion Andrei C. Grecu
research will look at other mathematically rigorous BCS ranking methods and adapt them
to rank the soccer teams that qualify for the soccer World Cup.
Another idea for future research might focus on changing the methods discussed
in this thesis, so that games that take place in the World Cup are immediately
incorporated into the model. Since there is no better indication of the relative value of a
team than its last results, updating the dataset of historical game during the tournament
Finally, whenever people are predicting the results of future events, there are
individual game results than the bookies for the 2002 World Cup games, there might be
“arbitrage opportunities” in the case of the upcoming soccer World Cup games. Of
course, my predictions still have a relatively high rate of failure, so there is no obvious
moneymaking betting strategy. However, here are my predictions for the 2006 World
Cup group games, as well as the simulation results for the probabilities for winning the
5
In making the predictions I used the team value from the Eigenvector rankings, which were the most
accurate in 2002.
68
Chapter 5: Conclusion Andrei C. Grecu
69
Appendix A: Neural Network C++ Code Andrei C. Grecu
/* team names */
vector <string> teams;
/* number of teams */
int N;
int adj[60][60][15];
if (prev[i] == prev[j])
{
/* win */
if (dif > 0)
{
double maxgain = (0.5-0.005*prev[i]) *prev[j]+
25+0.75*prev[i];
return (maxgain - prev[i])/55.0 * abs(dif*k) + prev[i];
}
/* lose */
if (dif < 0)
70
Appendix A: Neural Network C++ Code Andrei C. Grecu
{
double maxloss = 0.005 * prev[i] * prev[j] + 0.25 *
prev[i];
return (prev[i] - maxloss)/55.0 * abs(dif*k) + maxloss;
}
/* tie */
return prev[i];
}
/* win */
if (dif > 0)
{
double maxgain = (0.5-0.005*prev[i]) *prev[j]+
25+0.75*prev[i];
return (maxgain - prev[i])/55.0 * abs(dif*k) + prev[i];
}
/* lose */
if (dif < 0)
{
double maxloss = 0.005 * prev[i] * prev[j] + 0.25 *
prev[i];
return (prev[i] - maxloss)/55.0 * abs(dif*k) + maxloss;
}
/* tie */
double maxloss = 0.005 * prev[i] * prev[j] + 0.25 *
prev[i];
return (2.0*maxloss-prev[i])/12.0*k+prev[i]-
(2.0*maxloss-prev[i])/12.0;
}
/* lose */
if (dif < 0)
{
double maxloss = 0.005 * prev[i] * prev[j] + 0.25 *
prev[i];
return (prev[i] - maxloss)/55.0 * abs(dif*k) + maxloss;
}
71
Appendix A: Neural Network C++ Code Andrei C. Grecu
/* tie */
double maxgain = (0.5-0.005*prev[i]) *prev[j]+
25+0.75*prev[i];
return (maxgain-prev[i])/24.0*k + (25.0*prev[i]-
maxgain)/24.0;
}
}
if (tmp != INFI)
{
val += tmp;
++cnt;
}
}
if (cnt != 0)
curr[i] = (double) val/cnt;
else
curr[i] = prev[i];
}
/* scaling */
double a = 100.0/(oldmax-oldmin);
double b = - 100.0*oldmin/(oldmax-oldmin);
72
Appendix A: Neural Network C++ Code Andrei C. Grecu
bool finish()
{
for (int i = 0; i < N; ++i)
if (abs(prev[i] - curr[i]) >= epsilon)
return false;
return true;
}
void stable()
{
int iter = 0;
while (true)
{
if (iter == 1000)
break;
++ iter;
team_value();
if (finish())
break;
int team_to_int(string s)
{
for (int i = 0; i < N; ++i)
if (teams[i].compare(s) == 0)
return i;
73
Appendix A: Neural Network C++ Code Andrei C. Grecu
return -1;
}
void read_data()
{
/* read the # of teams */
cin >> N;
teams.push_back(s);
}
while (true)
{
string a, b;
int score;
int year;
year = -1;
if (year == -1)
break;
// cerr << a << " " << b << " " << score << " " << year << endl;
int na = team_to_int(a);
int nb = team_to_int(b);
assert(na != -1);
assert(nb != -1);
year -= 1993;
adj[na][nb][year] = score;
}
}
int main(void)
{
for (int i = 0; i < 60; ++i)
for (int j = 0; j < 60; ++j)
for (int k = 0; k < 15; ++k)
adj[i][j][k] = 100;
74
Appendix A: Neural Network C++ Code Andrei C. Grecu
read_data();
stable();
return 0;
}
75
Appendix B: Neural Network Evolution Andrei C. Grecu
After about 50 iterations, the neural network converges to constant values for
every team:
BRA
Neural Network Evolution ITA
FRA
120 ARG
ENG
100
GER
PTG
80
Team Value
NET
60 SPA
SWE
40 CZE
MEX
20 PAR
JAP
0 IRA
0 20 40 60 80 100 IVO
Iterations YUG
POL
76
Bibliography Andrei C. Grecu
BIBLIOGRAPHY
Callaghan, Thomas; Muncha, Peter; and Porter Manson. “Random Walker Ranking for
NCAA Division I-A Football”, Georgia Institute of Technology, June 15, 2005
Callaghan, Thomas; Muncha, Peter; and Porter Manson. “The Bowl Championship
Series: A Mathematical Review”, Notices of the American Mathematical Society,
September, 2004
Colley, Wesley; Colley’s Bias Free College Football Ranking Method, Ph.D. dissertation,
Princeton University
Devore, Jay. Probability and Statistics for Engineering and Statistics, 6th Edition.
Belmont: Brooks/Cole- Thomson learning, 2004.
Dixon, Mark and Coles, Stuart. “Modeling Association Football Scores and Inefficiencies
in the Football Betting Market”, Applied Statistics (1997), 46, No. 2
Dobson, A.J. An Introduction to Generalized Linear Models, Chapman and Hall, London
2001
Dyte D. and Clarke S.R. “A ratings based Poisson model for World Cup soccer
simulation”, Journal of the Operational Research Society (2000) 51, 993-998
Fleiss, Joseph L. Statistical Methods for Rates and Proportions. 2nd Edition, New York:
John Wiley & Sons, 1981.
Karlis, Dimitris and Ntzoufras, Ioannis. “Statistical Modelling for Soccer Games: The
Greek League”, Department of Statistics, Athens University of Economics and Business
77
Bibliography Andrei C. Grecu
Keener, James. “The Perron-Frobenius Theorem and the Ranking of Football Teams”,
Society for Industrial and Applied Mathematics Review, Vol.35, No.1, pp. 80-93, March
1993
Koning, Ruud. “Balance in Competition in Dutch Soccer”, The Statistician, 49, Part 3, pp
419-431
McCullagh, Peter and Nelder, J.A. Generalized Linear Models, Chapman and Hall,
London 1989
Palomino, Frederic; Rigotti, Luca; Rustichini, Also. “Skill, Strategy, and Passion: an
Empirical Analysis of Soccer”, in progress, Department of Econometrics, Tilburg
University
Pollard R, Benjamin B, and Reep C. “Sports and the Negative Binomial Distribution”,
Optimal Strategies in Sports, 1977
78