June 10th by Jason

graph

The Science of Getting Out of Your Group

There are 729 different ways a World Cup group can finish. That’s 729 combinations of point totals from each of the group’s four teams. I know because I’ve been obsessing over all 729 of them as I wonder whether my beloved, nicknameless USMNT squad can make my four years and get out of Group C.

Predictions about the US this year all revolve around one thing — can we get out of a pretty easy group? Most people are predicting we will.

The Soccernomics guys predict we’ll lose to Serbia in the round of 16 (see below), while EA Sports have us losing at the same spot, to Germany. Landon Donovan keeps saying we can beat England and still finish out of the top 2.

All this speculation was making me crazy, so I did what anyone would’ve done — I mapped out all 729 combinations, ran them through a PHP nested loop, and calculated the probability of getting out of the group for each possible point total.

It wasn’t quite as easy as it sounds.

The science part

If you don’t much care about math or probability, skip this section. First, the combinations. There are 6 matches played per group, in 3 rounds of 2 matches each. In each round, you have an A vs. B match and a C vs. D match. Each match can result in one of 3 outcomes.

  • A wins and B loses.
  • A draws with B.
  • A loses and B wins.

Mathematically speaking, the outcomes look like this.

  • A+3 | B+0
  • A+1 | B+1
  • A+0 | B+3

The same goes for the C vs. D match. That makes for 3 x 3 combinations per round. So far, so good. So the 9 main combinations look like this:

I admit, at this point, I got cocky. Just throw each row into an array of combinations, nest 3 foreach loops, and loop through the rows adding the A values together 3 times, the B values, etc. When it spit out exactly 729 combinations, I leapt like a Trekkie who just ran into Jonathan Frakes in the grocery store. Obscure, inexplicable joy.

But then I saw the first result: 9 0 9 0. How could two teams get 9 points in group play? Hint: it’s impossible. My formula was borked.

It took a few hundred paces around the room and a few more drawings before I realized that you don’t play the same team 3 times in a row. (I know, right?) The confusion was from calling the matches A vs. B and C vs. D, and also referring to the teams as A, B, C, and D. I switched to teams Blue, Yellow, Red, and Green.

Once I did, I realized I couldn’t just add columns A + A + A and B + B + B etc. I had to account for the different team match ups for each round. It actually looks like this:

A + A + A

B + C  + C

C + B + D

D + D + B

And while I’m sure nobody could possibly care less at this point, here’s why:

Follow each team’s rows through the 3 rounds and you’ll see how to add the correct matches together. And when you do, you get the Real Magical Spectacular List of 729 Combinations, as seen on my combos demo page. Try to hold back your tears.

So what are the chances?

Now, what the hell do you do with 729 rows of numbers? Probabilities, of course! I wanted to know 3 things:

  1. What’s the chance of getting each of the point totals?
  2. What’s the chance of at least having a tie-breaker situation?
  3. What’s the chance of getting out of the group outright?

Number 1 was easy. By assuming our team was the Blue Team, this probability was as simple as dividing the number of times each point total appeared by 729. (And no, there’s no mistake — it’s impossible to finish with 8 points.)

A standard bell curve distribution, no surprises. You’re most likely to finish with 3 or 4 points. Which sort of sounds like you’re most likely to not make it out of your group. That’s why we need the next set of probabilities.

Question 2 above asks, for each point total, how many combinations show at least 2 other teams with less than or equal to the same amount of points that our team has? So when we score 3, how many combinations show at least 2 other teams in that combination scoring 3 or less?

Divide that — not by 729 — but by the number of combinations where the blue team scored 3, and you get the probability that, when scoring 3, you’ll have at least a tiebreaker.

Change the question to “less than” instead of “less than or equal to” and you get the probability that, when scoring 3, you’ll move out of the group outright, no tiebreakers needed.

Put it all together, and what do you get?

A few things stand out

First, the difference between 3 and 4 is huge. A win and a draw is so much better than a win and two losses.

Second, if you’re only going to win once, make it big. That big orange section in the 4 point bar means there’s a large chance of going to tie-breaker. The first tie-breaker in World Cup group play is overall goal differential.

In other words, if you win your first game 4 – 0, you can safely hope for a draw and a loss and still be fairly certain to make it out of the group.

Third, there’s slightly more chance of getting out of the group outright with 5 points than there is with 6. Probably because 5 points means you drew twice, so there were less points around for the other teams, whereas 6 points means you lost once and gave another team 3 points instead of 1. My brain hurts.

Why anyone might care

I doubt many of you will care about all the math behind it, but after your team’s first match, take a look at this chart. It’ll give you one more way to obsess, guess, and torture yourself and your friends.

Happy World Cupping! May the best US team win!

Comments

2 Responses to The Science of Getting Out of Your Group

  1. Aw, this was a really quality post. In theory I’d like to write like this also – taking time and real effort to make a good article… but what can I say… I procrastinate alot and never seem to get anything done… Regards

  2. Caleb Kleppner said:

    Great post. Now that the WC is over, I wanted to add some commentary on how I used your work to answer a question I had. I had been wondering about the complete set of possible point totals for the group winner, second place, third place and fourth place. In other words, I didn’t care which team (A, B, C or D in your terminology) earned the points.

    Naturally, as a fan of the perpetual underdog US team, I really wanted to know how many points we really needed to get out of group play.

    I started by drawing lots of diagrams and came up with about 22 possible point combinations, from 9-6-3-0 to 3-3-3-3.

    But with your 729 results, it was easy: I sorted each result from highest points to lowest points, dropped them into a database and counted all possible combinations.

    It turns out there are 40 unique combinations of point totals for group play, as shown below my comments.

    From this list, it’s easy to see that it’s possible to advance with only 2 points and it’s possible to fail to advance with 6, with lots of possibilities in between, which is perhaps why group play is so interesting: nearly anything can happen right up to the end.

    Obviously, some of these combinations are a lot more likely than others. Wikipedia ( http://en.wikipedia.org/wiki/FIFA_World_Cup ) tells me that there have been about 89 groups of 4 teams in the World Cup from 1930 to 2010. I think it’s a safe bet that some of the 40 combinations have never been seen in WC group play (and you might have to adjust the point totals from early results, since I think wins used to be 2 points but now they are 3). But it’s be interesting to see how the actual distribution of point totals has compared to your calculations of the likelihoods.

    Now that the games are over, I’m not sure what to do with all the time I have on my hands.

    Cheers,
    Caleb

    ###

    Combinations of point totals from group play

    Points In group
    Serial #1 #2 #3 #4 Count Wins Ties
    1 9 6 3 0 24 6 0
    2 9 3 3 3 8 6 0
    3 6 6 6 0 8 6 0
    4 6 6 3 3 24 6 0
    5 9 6 1 1 12 5 1
    6 9 4 4 0 12 5 1
    7 9 4 3 1 24 5 1
    8 7 7 3 0 12 5 1
    9 7 6 4 0 24 5 1
    10 7 6 3 1 24 5 1
    11 7 4 3 3 24 5 1
    12 6 6 4 1 24 5 1
    13 6 4 4 3 36 5 1
    14 9 4 2 1 24 4 2
    15 7 7 1 1 6 4 2
    16 7 6 2 1 24 4 2
    17 7 5 4 0 24 4 2
    18 7 5 3 1 24 4 2
    19 7 4 4 1 36 4 2
    20 7 4 3 2 24 4 2
    21 6 5 4 1 24 4 2
    22 6 4 4 2 24 4 2
    23 5 4 4 3 24 4 2
    24 4 4 4 4 6 4 2
    25 9 2 2 2 4 3 3
    26 7 5 2 1 24 3 3
    27 7 4 3 1 24 3 3
    28 7 4 2 2 24 3 3
    29 6 5 2 2 12 3 3
    30 5 5 5 0 4 3 3
    31 5 5 4 1 24 3 3
    32 5 5 3 2 12 3 3
    33 5 4 4 2 24 3 3
    34 4 4 4 3 8 3 3
    35 7 3 2 2 12 2 4
    36 5 5 3 1 12 2 4
    37 5 5 2 2 12 2 4
    38 5 4 3 2 24 2 4
    39 5 3 3 2 12 1 5
    40 3 3 3 3 1 0 6

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

So, Where Now?