10 things after Liverpool go out of the CL

Written on 12 March 2025, 05:05pm

Tagged with: , ,

Photo: Sky Sports
  1. PSG deserved it. Let’s get that out of the way first: across the two legs, they were the better team. They won the xG score 4.41 vs 1.86 in total, and they look like a team that can go deep in this competition. In fact, I would not be surprised if they will win it. As for Liverpool, yes, they had their chances on Anfield, but c’est la vie!
  2. The little details count. “In a game now packed with the latest modern technology and VAR, it’s curious that an old-fashioned coin toss can still have such an impact on the outcome of such an important encounter“. In the beginning of the game, Van Dijk won the coin toss but gave away the chance to attack in front of the Kop in the second half (he changed his mind the second time around, before the extra time). But PSG then won the two important coin tosses: to have the shoot-out in front of their fans and to shoot first. There is statistical evidence showing that the team kicking first wins in 60% of the cases, so PSG started the penalty shootout with two small, but important advantages. Finally, another little (big) detail was that two of the Liverpool players were observing the Ramadam fasting tradition: Salah and Konate. This means their game preparation was impacted, being only able to eat or drink after sunset (only a bit more than an hour before the game started).
  3. Speaking of little details, having a weekend to rest helped PSG massively, especially with the game going into extra time. After a Klopp-like pressing in the beginning of the two halves, Liverpool got tired, and they lost the midfield battle after Szoboszlai and MacAllister went off. PSG on the other hand looked more fresh and controlled the game better after absorbing the initial Liverpool pressure. In retrospect, the penalty shootout was Liverpool’s best chance to go through.
  4. It was one of the few games when the Liverpool substitutes were really poor and could not influence the game at all. Quansah was the only one having a decent game (and perhaps Endo too, despite playing only 10 minutes), but the other 4 – Nunez, Jones, Gakpo and Elliott – had a game to forget, especially the first two. Gakpo might have the excuse of coming back from an injury and was likely not 100% fit to play. Perhaps this is an opportunity to reflect on the squad depth and how things could be improved in the summer.
  5. Alisson was outstanding, but his penalty record is average. He made 16 saves across the two PSG legs, with his performance in Paris described as ‘best of his life’. But he could not save any of the four PSG penalties, and looking at his penalty record, his stats are not more than average: he saved two penalties in the PL (Chelsea and West Ham) and one in the CL (Napoli) out of 12. He was involved in three penalty shootouts: two on Wembley (against City and Chelsea) and the one on Anfield last night. He only won one (against Chelsea, in the FA Cup final in 2022), after saving one penalty (against Mason Mount). Until now, Alisson has only saved one penalty on Anfield (Bowen, 2022).
  6. Slot got his penalty takers wrong. I would have gone with Salah, Virgil, Gakpo, Endo and Eliott, in this order. Would have kept Nunez as the 11th penalty taker. Wrong end and megaphones aside, there was sense of inevitability that we will miss (not a big fan of stuttering penalties, BTW).
  7. Liverpool depend too much on Salah. When Salah is having a bad day (and against PSG he had two), and he doesn’t score, chances are Liverpool will not win. This season there were only 5 games when Liverpool managed to win despite Salah having no goal involvement (Milan and PSG away, Palace, Forest and Brentford away). There were of course three 0-1 losses – against Forest (PL), Spurs (EFL) and PSG last night when Salah had no impact. This is not encouraging for next season, so
  8. Liverpool will probably look for offensive players in the summer. There is uncertainty regarding the new contract of Salah. Nunez is likely to be sold (and Liverpool should sell him, if you ask me). Jota is decent as a squad player, but he’s frequently getting injured (and a bit unreliable, recently). Chiesa is a mystery and I can only hope that he will have the same trajectory as Gravenberch, who only played a few games in his first season but then he became irreplaceable in his second. I also hope that Diaz will stay, but you never know. It could be a long and complicated summer for Liverpool.
  9. All done and dusted, if you’re going to exit from the CL, better do it early. I am aware of the financial implications, but losing two CL finals hurt a lot. Despite having a brilliant season so far, I could not see Liverpool going deep in the CL (it would have been different if they were drawn on the other side of the table, playing Benfica and Lille/Borussia for fun until the semifinals). It’s been a long season and players like Virgil, Salah, Gravenberch, Mac Allister or Szoboszlai have a lot of minutes in their legs.
  10. There’s still a final to win on Sunday, and more importantly, a Premier League advantage of 15 points with 9 games to go. Only 10 games to be played this season – there’s hope that the players and the supporters will enjoy them.

The importance of visualization in problem solving

Written on 10 February 2019, 12:36pm

Tagged with: , ,

This weekend I thought about the flashlight and 8 batteries riddle:

You have a flashlight that works with 2 batteries. You also have 8 batteries, of which 4 are empty and the other 4 are full. There is no way to tell which battery is empty and which one is full, but you can put 2 batteries in the flashlights. If both of them are full, the flashlight will turn on.

What is the minimum number of tries that will guarantee that the flashlight will turn on?

At first, I explored the possible combinations, then I considered playing with probability trees. But then I put this on paper, and soon, things became much clearer. I represented the batteries with dots, and the tries with lines, and instead of playing with abstract concepts, I started to play with lines and dots:

Dots and lines

First I found a solution that would try 7 combinations, and would guarantee that the 8th was correct:

8 lines, guaranteed to work. But could it be better?

But somehow I knew that the solution had to be 7 tries, not 8. So I kept moving the lines and connecting the dots until the bulb lit (pun intended):

The solution: it had to be symmetric…

No matter where the 8th full battery is, there will be a line connecting it with another full battery. (You can also find a video here).

This shows the importance of visualizing your problem before being able to come up with the answer. I am using a Moleskine notebook and a Baron Fig Squire pen (some say it’s the best pen in the world 🙂 ).

UEFA CL draw probabilities – 2018 edition

Written on 19 December 2018, 06:44pm

Tagged with: , , , ,

This is a follow up to https://colorblindprogramming.com/round-probabilities-before. Last year I stopped after discovering that the only correct way to calculate the odds is to look at the probability trees. This year I took this one step forward and created a script that would calculate the correct probabilities. I intend to reuse this script for the future draws, and a year it’s a long time for my memory so I am adding some notes here.

The incorrect approach: the big-bowl

The first approach last year was to calculate all the possible pairs, eliminate the invalid ones and then calculate the associated percentages for each pair. In hindsight, this approach was obviously wrong, because it doesn’t replicate the actual draw. This approach would only be accurate if the draw consisted of a single draw – from a very big bowl of all the valid options. This is obviously not how the actual draw works, so even if the final numbers were pretty close to the correct ones, it was not the correct approach.  

The correct approach, using conditional probabilities

The correct way to look at this is by understanding that we are talking about dependent events. Each draw depends on the actual result of the previous draw. It’s identical to this process, beautifully explained on MathIsFun.com:

So how do we actually do it?

There are two approaches:
The first one is a bit more complicated and implies creating the tree above for the 16 teams and 16 steps (each team pick is a step). It has the advantage of producing accurate results, but it’s a bit more difficult to implement.
The second one consists of simulating the draw process and repeating it a lot of times. I found this approach easier, here is the pseudo-code of the draw process:

  1. for each unseeded team
  2. if there is a mandatory draw (starting from the 5th unseeded team)
    1. then automatically create the pair and add it to the draw
  3. otherwise, pick a random unseeded team
    1. get the list of available seeded teams
    2. randomly pick a seeded team from the list above
    3. add pair to the draw
  4. end

Repeating this process a few millions of times would lead to millions of possible draws, and based on that we can calculate the percentages.

But there are 2 catches:
1. Checking both sides of the draw. Have a look at the step 2 above, checking if there is a mandatory draw: let’s say you are left with 4 unseeded teams and 4 seeded teams. It’s not enough to look at the unseeded teams options, you also need to look the other way around. Example:
Unseeded teams: Liverpool, United, Shalke, Lyon
Seeded teams: PSG, City, Real, Barcelona
Liverpool has 2 options, United 3, Shalke 4 and Lyon 2. But if you randomly pick Shalke and you pair it with any of PSG, Real or Barcelona, then you leave an impossible draw for City (which cannot be drawn against any of the 3 English teams left). So the solution is to count the number of options for both unseeded and seeded teams. If there is a single option, pick it.

2. Go back if needed. Even with the above safety mechanism in place things can still go wrong. Example:
Unseeded teams: Roma, Liverpool, Shalke, Lyon
Seeded teams: Porto, Barcelona, PSG, City
Options for the unseeded teams: Rome -4, Liverpool -2, Shalke -4, Lyon -2.
Options for the seeded teams: Porto -3, Barcelona -4, PSG -2, City -2. 
The safety mechanism above (counting the number of options for both seeded and unseeded teams) tells us that everything is fine. So we go ahead and pair Rome with Porto. We are now left with:
Unseeded: Liverpool -1, Shalke -3, Lyon -1
Seeded: Barcelona -3, PSG -1, City -1.
The problem is that both PSG and City have an option, and that option is Shalke. So this leads to an impossible draw, so the solution in this case is to go back one step and pick another draw instead of Roma v Porto.
According to my calculations this could happen in about 0.4% of cases, and I am really curious how UEFA would handle it if it happened on stage. In the scenario above, if Roma was selected as unseeded team, I expect that the computer will only allow PSG and City to be one of the seeded teams, but I am really curious to hear the hosts explanation about this constraint (since both Porto and Barcelona are, at first sight, also valid options for Roma) 🙂

Using the algorithm above, I ran the simulation 2 million times. These are the results:

Checking the results

The nice thing about being both a geek and a football lover is that you get to know smart persons at the intersection of science and football. Two of them are Julien Guyon and Emmanuel Syrmoudis. They also spent time thinking about this topic. Julien came up with a great explanation of the draw process and probabilities, while Emmanuel went one step forward and actually created an interactive draw simulator.  

My results come pretty close to theirs, so I’m quite confident that my method is decent enough. I plan to reuse it again next year and, perhaps, also try to create the actual probability tree to get the exact percentages. Â