R - FIFA football world cup 2018
23 May 2018
World cup football european meaning will start in June 2018. It’s time to get knowledged about rules and to foresee what could be the ouputs of the different groups.
Rules and regulation
Official document provides many information. If you have just 2 minutes, look at page 26 to get the decision rules allowing to break the ties at the end of the group matches.
Teams from the whole world will be present, at the exception of North America. see map
Groups are fully discribed here
The main question, today, is, what shall do a team, to get qualified from its group?
FIFA groups
A FIFA group is made of 4 teams, with a single match between each of them. Therefore, each team, will have to play 3 games. Each game can result in victory, draw or loss. Victory brings 3 points, draw 1 point, loss 0 point.
According to this rules, and considering all the possible combinations, what is are? the minimum necessary results to get qualified ?
Group Result analysis
Six games, each with 3 possible outcomes. So 3^6 = 729 possibilities. Using R programming language, let’s proceed to a brute force analysis of each case.
Immediate qualification
Immediate qualification means, team is qualified either as first or second of its group, without any tie. I mean, that group results bring a clear differentiation between all the teams, and two of them end up to have clearly more points than their opponents, and so are directly qualified.
INSIGHT 1: A team needs at least 5 points to get qualified as 1st of the group, without any tie.
INSIGHT 2: A team needs at least 4 points to get qualified as 2nd of the group, without any tie.
To get the details of possible score, browse summary tables below. It’is quite simple. Just know that ‘fx’ with x being a number, stands for the points of the 1st group team.
> print(f5)
case_1
1: 5
2: 4
3: 3
4: 2
> print(f6)
case_1 case_2
1: 6 6
2: 5 5
3: 4 2
4: 2 1
> print(f7)
case_1 case_2 case_3 case_4 case_5 case_6 case_7 case_8 case_9 case_10 case_11
1: 7 7 7 7 7 7 7 7 7 7 7
2: 6 6 6 5 5 5 4 4 4 4 3
3: 4 4 3 3 3 3 3 2 2 2 2
4: 3 2 2 2 1 1 1 1 1 0 0
> print(f9)
case_1 case_2 case_3 case_4
1: 9 9 9 9
2: 6 6 4 4
3: 3 3 2 1
4: 1 1 1 0
Ambiguous cases on 1st place
Ambiguous cases for first places, covers cases where first place is disputed. It could lead to an immediate qualification, indeed we do not know at which place yet. It could also lead to a disqualification, if the decision rules are not in the favor of the team. Let’s see the decision tree for all the cases.
INSIGHT 1: if you do not get more than 2 points, you can not reach 1st place of the group, if any tie.
INSIGHT 2: you may get immediately qualified with 5 points, whereas being disqualified with 6 points, if any tie.
NOTA BENE: Note as the number of teams tied increases as the number of points decreases!
Get possible scores below.
> print(f7)
case_1 case_2
1: 7 7
2: 7 7
3: 3 1
4: 1 0
> print(f6)
case_1 case_2 case_3
1: 6 6 6
2: 6 6 6
3: 6 4 3
4: 3 1 0
> print(f5)
case_1 case_2 case_3 case_4 case_5
1: 5 5 5 5 5
2: 5 5 5 5 5
3: 5 4 3 3 2
4: 2 2 1 1 0
> print(f4)
case_1 case_2
1: 4 4
2: 4 4
3: 4 4
4: 4 3
> print(f3)
case_1
1: 3
2: 3
3: 3
4: 3
Ambiguous cases on 2nd place
Tie can occur for second place. Here the tie is critical. There are only 2 places for qualification, and one is already granted to the 1st of the group. So a decision has to be made between the tied teams, that can be 2 or 3. Here is the decision tree associated with such cases.
> print(f9)
case_1 case_2 case_3
1: 9 9 9
2: 4 3 2
3: 4 3 2
4: 3 2 0
> print(f7)
case_1
1: 7
2: 4
3: 4
4: 1
> print(f6)
case_1 case_2
1: 6 6
2: 4 4
3: 4 4
4: 3 2
> print(f5)
case_1 case_2 case_3
1: 5 5 5
2: 4 4 3
3: 4 4 3
4: 3 2 2
What to conclude?
Now we know the stats, we can just watch the games and foresee the teams qualification as game progresses, using the table score provided, and the decision trees.
As I am French, I will follow France team during Russia World Cup 2018. I predict them to reach semi-final stage, but prior to this, I’ll use results provided here, after
each of their match and try to predict what can be their final standing in their group.
Note
All calculus executed using R language. All images have been produced with data.tree package .