Showing posts with label probability. Show all posts
Showing posts with label probability. Show all posts

Friday, 30 August 2019

Pack Habits of European Wolves


On Thursday last I saw a Tweet (unfortunately I’ve lost sight of it now) that was bemoaning a very specific flaw with the draw for the UEFA Europa league. The writer was unhappy that Wolfsburg of Germany, Wolves of England and Wolfsberg of Austria were all in different groups. What are the chances, eh?  Well, we can work it out.

The task is made a lot easier in that the group stage draw is seeded with four pots of twelve teams.  The ultimate Wolverine combination was technically possible because the three teams were in pots 1, 3 and 4 respectively. Sadly, Woolongong Wolves of New South Wales, Australia were not present in pot 2. Maybe the Europa League will eventually go the way of the Eurovision Song Contest and open that door one day. We can but hope.

We don’t need to concern ourselves with the actual draw order, we can just think about the possible outcomes. Wolfsburg are bound to be in a different group from all of the other pot 1 teams. It doesn’t matter to us whether it turned out to be group A, B or whatever. Likewise, the outcomes from pot 2 make no difference. There is no Wolfie interest in that pot. We care less about pot 2 than Boris Johnson cares about Remainers, and that’s saying something.

WOLFSBURG
And a pot 2 team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team
Any other Pot 1 Team
Any Pot 2 Team

So, Wolfsburg have to be somewhere, and we don’t care who they are with or what any of the others are doing. We are therefore looking ONLY at one twelfth of all the possible outcomes at this point, shown here in yellow. The white zones have another team from Pot 1.

For the outcomes of the third pot, we are only interested in where Wolves end up. As a WBA fan, even I’m only interested for blogging purposes. Assuming the draw is fair, they have an equal chance of ending up in any of the twelve groups.

So the yellow area … is divided into 12 equal pieces. Only one of these would have Wolves from Pot 3, shown here as Orange. They’d want Old Gold but they are pretentious like that.

WOLFSBURG
And a pot 2 team














On the right, the Orange area would represent Wolfsburg plus any pot 2 team plus Wolves. The Yellow areas are Wolfsburg plus any pot 2 team plus any one of the other 11 pot 3 teams, all of equal probability.  So we are down to one-twelfth of one-twelfth of all the possible outcomes.
Hopefully it is now straightforward to see that the desired presence of Wolfsburg to join the other two in effect divides the orange area into twelve once more.  Only that twelfth of the twelfth of the original twelfth is now of interest, shown here as red but magnified to a different scale at the risk of confusing you.














The rest of the orange is Wolfsberg/anyone/Wolves/anyone.  All the combinations where Wolfsberg and Wolfsburg are together, but with no Wolves, would be somewhere over in the yellow zone. Likewise there would be some permutations in the white areas there which had thrown Wolves and Wolfsburg together, but without Wolfsberg. Try working out the chances using the same method.

Anyhow, it’s clear that the perfect packing of European Wolves would only happen in a twelfth of a twelfth of a twelfth of all possible draw outcomes. This is 1 in (12 x 12 x 12) or 1 in 1728, or as a percentage, around 0.058%. In round figures about one in 2000. Howl low is that? (sorry) This is low, but still higher than the chances of being killed by a wolf while the UK is winning the Eurovision Song Contest and much less than winning the lottery.

Thanks (or should that be fangs) for your interest!

Wednesday, 19 March 2014

Crunching the Numbers


This is a modified version of a post from March 2011 and is dedicated to David Moyes, a misunderstood genius just like me ;)

In interviewing scores of people for jobs in schools over the years, I have met many people who were quite happy to admit they felt uncomfortable with numbers, and mathematics in general.  My aim in this particular post is to explain some probability calculations in an accessible and readable way, and try to demystify some of the supposed difficulty.

Here’s a question: "What are the chances of Man Utd playing Chelsea AND Real Madrid playing Barcelona in the Champions League Quarter-Final draw?"  (Doesn't matter which team is at home in the first leg.)

The classic quarter-final draw has eight balls in one pot, which can be drawn out with no special seedings or restrictions, to give four ties, with home & away teams decided by the order of the draw.  The mathematics is exactly the same for the current Champions League quarter final draw and the Sixth Round of the FA Cup or the FA Vase.

Whatever happens, the chances of it happening will be 0.059523809%, and hopefully this post will prove it in a way that is relatively easy to understand.

Step One – How many alternative draws are there?

Imagine the balls are numbered 1 to 8.  They could emerge in the order 4>3>7>1>8>5>2>6 but this is only one of many possibilities.

To establish the pattern, let’s simplify things and consider a draw of only two teams.  There are TWO possibilities for the first ball out, 1 or 2.  However, whichever one comes out, there is only ONE ball left in the bag.  So the only possible sequences are 1>2 or 2>1 and a total of 2 x 1 = 2 possibilities.

For three balls in a bag, there are THREE different possibilities for the first ball out.  For EACH of these outcomes, there are TWO different possibilities for the second one out, and then the third is fixed because there is only ONE left.  This means 3 x 2 x 1 = 6 possibilities.  They are 123, 132, 213, 231, 312 and 321.  (This pattern does not appear in cup draws as there are an odd number of teams!)

Four balls in a bag is a classic semi-final draw, and I have covered this in a previous post.  Hopefully it is clear by the same logic that there are 4 x 3 x 2 x 1 = 24 possibilities, and the table in the post covers them all for the conspiracy theorists.


These numbers are known as factorial numbers and denoted by the ! symbol in conventional mathematical notation.  1! = 1, 2! = 2, 3! = 6 and 4! =24.  So the first number that we need for our quarter-final analysis is 8! = 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 = 40320.  In other words, the sequence 43718526 that I mentioned above is only one of 40320 unique possibilities for the appearance of the balls.

(We will need to remember later that some of the different sequences have the same sporting outcome in our particular example.  If the teams appear in the order 12345678 then the matches will be the same as if they appear 78563412.  More of this later.)

(These numbers get pretty large in the earlier rounds of the competition.  Try working out the number of possible draws for the third round of the FA Cup, which has 64 teams!  It's about one hundred and twenty-seven thousand billion billion billion billion billion billion billion, using a billion to mean a million million.  Perhaps we'll come back to this next January, if you are still speaking to me.)

Step Two – What is the chance that Man Utd will play Chelsea?

In my question, I made no distinction about which team was home or away on the first leg, so common sense takes us the next step.  Assuming the draw is fair, Chelsea is one of seven possible opponents for Manchester United.  All of these opponents are equally likely, so the chance of any named one is 1 in 7 (expressed as betting odds), one seventh (expressed as a fraction of one) or 14.2857% (expressed as an approximate percentage chance).  You can see this by working out 100 divided by 7 on a calculator, and it is an example of a recurring infinite decimal.  One seventh is 0.142857142857142857…. with the six numbers repeating in the same order.

Putting this visually, the size of this rectangle represents all the possible 40320 draw outcomes.  The reason why this is a 5x7 grid will become clear shortly.





































In one-seventh of these (5760 of them to be precise), Manchester United will play Chelsea.  In another 5760 of them, Manchester United will play Real Madrid.  Manchester United have to play someone, and 7 x 5760 = 40320 as all seven opponents are equally likely as we said.





































So the green-shaded area represents the 5760 possible draws in which Manchester United would play Chelsea, and the other six teams are playing each other in all the various permutations.

Step Three
What is the chance that Man Utd will play Chelsea AND Real Madrid will play Barcelona?

For the second part of my question, we have to focus ONLY on these 5760 possible draws that put Manchester United and Chelsea together.  Real Madrid may play Barcelona in lots of possible draws in which, say, Manchester United played Bayern Munich and Chelsea played Dortmund.  Those would be irrelevant to the question, which is about the chance of two things happening simultaneously.  To mathematicians, the word AND is very different from the word OR in these types of problem.

So let’s assume that Manchester United are to play Chelsea, in one of those 5760 possibilities shaded in green.  Real Madrid must be playing one of five other opponents, equally likely.  So one-fifth of those 5760 outcomes will have Man Utd v Chelsea AND Real Madrid v Barca.  5760 divided by 5 is 1152.  In other words, 1152 of the 40320 possible draws will have these two pairings.  (The other two pairings could be either way round, it wouldn’t affect the answer to our question.)

Visually …





































The dark-blue segment represents our answer in which Man Utd play Chelsea AND Real Madrid play Barca.  It is one-thirtyfifth of the whole rectangle.

So we have two ways to calculate the final answer.

The fraction one-thirtyfifth as a percentage is worked out by pressing 100 divided by 35 on a calculator and we see 2.85714%.  Again, those numbers would repeat in an infinite decimal.  The same answer is achieved by calculating the odds as 1152 divided by 43020 and multiplied by 100 to get a percentage.  2.85714% again – it’s really exactly the same destination, just reached by two different routes.

Step Four – Finally, why does any real draw have a 0.059523809% chance of happening?

Remember that there are 40320 unique draws – each one is a unique sequence of the eight balls.  The chance of any individual sequence, say 14528763, is 1 in 40320 (expressed as odds), 1/40320 (as a fraction) and 0.00248015873% as a percentage.  If you try 100 divided 40320 on your calculator it will either round it to something like 0.00248 or will show it in something called standard form as 2.48015873 x 10-3.  I’m guessing that if that means anything to you, you have easily understood the rest of this post so I am moving on quickly.  It’s a small chance – one in about forty thousand.

However, in this particular context it doesn’t really matter to us which order the four ties come out.  Remember I said earlier that we would need to come back to this point.  With four ties to be drawn, there are 24 possible ways of getting the same sporting pairs with the same home/away order (by the same logic as the semi final draws), so my final step is to say that this combination of teams in the right home/away order would have come up from 24 out of the 40320 possible outcomes, and the same type of calculation gives us 0.059523809%. 24 divided by 40320 multiplied by 100 if you want to check.

Remember, you will be able to say, “Well, that had a 0.059523809% chance of happening!” EVERY year after EVERY FA Cup Round Six draw.  The numbers will always be the same, and if that doesn’t win you gasps of admiration I’ll be amazed.

Postscript – What were the chances of an all-Spanish tie?

There are three Spanish teams in the draw, so there could be one all-Spanish tie, or none.  Going back to our visualisation, the green area represents all the possible 5760 outcomes in which Real Madrid play Barcelona.  Atletico could be playing any one of the other five teams.  The orange area represents all of those (another 5760) in which Real play Atletico, and Barcelona could be playing any one of the other five.  The purple area is for Barcelona playing Atletico.





































We can see that as a fraction this is three-sevenths, or (3 x 5760) out of 40320 = 17280 / 40320.  Either route leads us to 42.8571% and those same digits in a different order!  Beautiful, I think you'll agree.

So there we are.  Welcome to my world.  I told you there'd be tangents, and remember, "Chance is a Fine Thing". :)