Welcome back to the Oxford Mathematics Public Lecture Home Edition.
This is the fourth event. My name is and I go, really? And I'm in charge of external relations for the Mathematical Institute as usual.
Special thanks to a sponsor execs Market Exchange Market,
a leading quantitative driven electronic market maker with offices in London, Singapore and New York.
Their ongoing support is crucial in providing you quality content.
It has now been more than five months since the lockdown started. The news is still dominated by the current coronavirus crisis.
Scientist and mathematician are busier than ever working on a possible solution to the many problem that it has created.
But if you are like me, you must be a bit exhausted by all of it.
So at Oxford Mathematics, we decided that it was time for a bit of fantasy fantasy football, to be precise.
A couple of weeks ago, it was announced that one of the post-docs, Joshua Boyle,
was the winner of the 2020 Fantasy Premier League competition, an event in which more than eight million people around the world compete.
In his day job, Josh studied mathematical biology in Oxford, and he has kindly agreed to give us a public lecture about fantasy football.
What is it? An arcane mathematics help win today?
Let's find out if you have questions for Josh.
Send them to us through social media. Josh will collate them and post the answers.
So thank you very much, Josh, for doing this. Please stop now.
Thanks, Helen. So my name is Joshua Bell, and I'm a researcher, not in fantasy football,
but in mathematical biology, which is something that I'm going to sneak into this talk as well.
And so I work in the Wolfson Centre for Mathematical Biology at the Oxford University Mathematical Institute.
And as I say, my my main area of focus is on cancer modelling.
And but today, I'm not really going to talk to you about that cancer.
Talk to you about whether maths can tell us how to win fantasy football. And the answer to that and one slide is not really, but also sort of yes.
And so thank you all for watching. It's been a lot of fun.
And don't worry, obviously you get more for your money than that, and I will start by just kind of introducing myself a bit.
So as I say, I'm not a football expert, I'm a mathematician and specifically a researcher in mathematical biology.
And as I say, I'm developing mathematical tools to apply to the problem of cancer.
So in particular, I use something called mathematical modelling,
which I'm going to talk to you about in a bit more detail and just generally trying to use maths to gain insights and test ideas.
And yeah, that's that's kind of what this process of mathematical modelling is.
So as far as giving a talk about fantasy football goes, my football expertise is a bit more limited.
And so you might question my footballing judgement straightaway. I mean, at Switch Town Football Club supporter.
And for those of you that are more focussed on less football inclined, they are the best football club in the world, as far as I'm aware.
And unfortunately, I can't remember ever scoring anything apart from an own goal.
But I do occasionally come up with the good football pub, although I can assure you there won't be any endless talk, at least not intentionally.
Maybe if I think of one off the top of my head. And so why am I giving this [INAUDIBLE] about fantasy football?
Well, because the Premier League made a GIF about me. So there is a competition which they've won every year called Fancy Premier League,
and which this year about seven and a half million people competed and I was lucky enough to win it.
So I'm going to talk to you about what that means a bit more and and talk to you about the question which everyone asked,
which is, Well, does that have anything to do with you being a mathematician? But first things first.
What is fantasy football? So I try to explain this to some mathematicians recently, and it took about 20 minutes.
It wasn't a good explanation, and at the end, someone said, Hey,
you could have just played that one minute video the fantasy Premier League on Twitter, and that would have said it.
So I thought I'd do exactly that.
So the idea of fantasy football is that you'd start off with a budget of £100million and you choose a team of 15 players using that.
And from these specific positions, you're only allowed three players from any club.
So you can't just load up with Liverpool or Man City or something. And every week you choose 11 players that you think will do the best.
And basically, when they go and play the actual football games, you're virtual,
players get points for their performance on the pitch and you get one player to be your captain who scored twice as many points.
That's it in a nutshell, and I'll go over some more rules later when they become relevant.
Don't worry. So the question that everybody keeps asking me once it finished was, did you use maths to?
And I think that's a really interesting question to kind of pick apart a little bit first
because it definitely seems to be true that being a strategic thinker is a benefit,
and mathematicians like to think of ourselves as being quite good strategic thinkers, I think.
So just as an example here, this this headline is from The Guardian talking about Magnus Carlsen,
who's the world chess champion and who also plays Fantasy Premier League, and he was topping the rankings back in December.
I think he finished ninth or 10th, maybe 11th in the end.
But anyway, there seems to be some link between strategic thinking and doing well at this game.
But I really want to pick into this question of did you use maths?
Why? Why is that a question that I've been asked by lots of non mathematicians?
Why do we think that maths could help us to understand the game of fantasy football?
Are we expecting that we can write down some equation which tells us exactly what to do?
And you know, that doesn't seem at first glance to have anything to do with choosing a fantasy football team.
So I guess as a starting point to answer that question, we need to think about what it is that mathematicians do.
And believe it or not, we we do do things. So I work in mathematical modelling.
When I tell people that I work in modelling, they normally say, Well, somebody with your good looks and fashion sense that doesn't surprise us,
and I don't have to explain to them that know that that's a different kind of mathematical model.
It's not just a particularly good looking mathematician like Albert. And but it's it's a tool that we use.
So in particular, I want to think about mathematical models as being a way of of exploring and understanding very complex systems,
which is a very general definition that I just made up and have have.
Cruelly quoted to Bobby Robson, I'm sure he was very good at mathematical modelling, but as far as I'm aware, he didn't actually say something.
But what John Kerry did say is that people don't believe that maths is simple.
It's just because they don't realise how complicated life is.
So I think this is a really great quote for understanding mathematical modelling because to lots of people, maths is something that's very complex.
And but really, when you compare the complexity of of solving some equations and the complexity of
learning things in a maths class with trying to describe how the real world works,
you realise that actually it's it's a simplification.
And really what we try to do is is translate complicated things into maths so that we can then solve them in this kind of simple language.
So in terms of a practical example of that, and I promise I will start talking about fantasy football eventually,
but I want to think about the big question, the really big question in my research, which is how should we treat cancer?
So that's a really complicated question. It's got a lot of a lot of problems just in the framing of the question.
Cancer isn't one disease. There's not one particular approach which is going to be best.
But what we aim to do is as scientists, first and foremost, is to try and try and break that down into smaller,
more meaningful questions so we can break that down and break it down and break it down again.
And don't worry if this is an overwhelming amount of information because it's supposed to be.
These questions aren't easy. And the message I want you to take from this is that the aim of science is to break down these big
questions until we get questions that we can actually answer until we get hypotheses that we can test.
And that's science in a nutshell. So why am I telling you all of this in the fantasy football team and see football team fantasy football talk?
Well, because fantasy football is another complex system.
It's something where you know, it's it's very easy to ask the question Well, how do we win fantasy football?
But actually trying to tackle that question is very difficult.
You need to break it down into smaller parts. Who should I pick in my team?
Who should I choose to be my captain? That's caused me double points.
And then we can repeat this process until we get to some things we can actually test.
You know, who should I put my team? I should choose players that have got good fixtures.
That may be true. That may not be true, but it's a hypothesis that we can go out and investigate.
And the way that scientists have traditionally done this is by going and doing experiments.
Once they've got a hypothesis and they look at the experiments and they see whether whether it stands up to scrutiny or not.
That's not the only way that we can explore these hypotheses, and that's what we try to do with mathematical modelling.
The aim of the model is is to help us to explore these problems and to look at these hypotheses and see what more information we can get from them.
So one of the best ways to think about about modelling is about reducing complexity.
We don't want to try and build a model of the entire fantasy football game because it's very complicated.
There's a lot of moving parts. We don't know how many points players will score.
People might be injured or they might move team on.
Any number of things could happen. And then during the game, anything might happen.
So as with when we're applying research in a kind of more potentially more useful context,
what we want to do is break, break things down and find a model to tackle a simple problem.
So one way of thinking this is to try and think about what you do with your hypothesis.
So this is an example that I'm kind of taking very generically from a research paper,
which we recently did and which I've mainly put in here to convince you that I don't spend all of my time doing fantasy football.
I do actually do some real research.
And so you might start with a hypothesis like cells within an you might get pushed around and you might find some experimental data about that.
So what you want your mathematical model to do is to take that data and build on it.
You want to see if you can get an understanding of why you see the data that you see
by taking in predictable rules that describe the system that you're interested in.
So in this case, I want to simulate a tumour and simulate the forces that are at work within that.
And then I can go and explore that and see what happens when I change things in my model that
I couldn't necessarily do in an experiment and that might then generate a new hypothesis.
So instead of saying, well, cells get pushed around, we can maybe say, well, with our model,
we can predict what how the tumour is behaving by looking at the way that cells pushed around.
So that hypothesis can then feed back into to our collaborators who work in the lab, who might then say, Oh,
well, let's let's do the experiments, test that, let's see if we can, if we can push this and we get a cycle.
So. Really, what we want to do or what I want to do is get these these kind of two different ideas through to the.
Scientific thinking is about trying to reduce complex problems down to testable statements,
whereas mathematical models are about taking taking those these simple statements and
exploring them and seeing what the consequences are of the assumptions that you're making.
So now we can talk about fantasy football, because in fantasy football, as we've just seen, we can have some hypotheses.
So people kept saying to me, what you know, how?
What was your strategy? What were you doing?
And I didn't write these rules down at the start of the season and try to play the game, according to these rules.
But in hindsight, I think these are the kinds of things that I was thinking about to make my decisions.
So in particular, things like only having a very few expensive players, but sticking with them for the whole season.
So as a general rule, players that score more points are more expensive in the game.
So you'd like to have a team made just of expensive players, but obviously you can't afford to do that.
I was also trying to give players a chance and hold on to them for, you know, longer than possibly most fantasy football managers.
But when I was making transfers, I was using those transfers to get rid of players that I didn't want in my team,
as opposed to just bringing in people that have scored really well, but one in my team and thinking, I need to get that player.
And also had a very good practise of, if in doubt, cut Mo Salah, and of course,
the most important hypothesis of all was never to pick him up from Norwich, which is such time finance.
I can tell you it's very good advice. So the question really is I've got two sets of hypotheses here.
Do these tell us what the right moves to make up? So what do we mean by the right moves?
So I scored just over 2500 points over the course of the season.
And but this this talking Kiwi on Twitter has managed to look back at the data and find a set of transfers you could make,
which would score four thousand eight hundred eighty nine points, which is a lot.
And no fantasy football manager, to my knowledge, has ever come anywhere close to doing that.
So does that mean that those moves were the right moves to make and the, you know,
the things that we should all have been doing last season were these exact transfers that this person has found.
Well, the problem here is that all of the moves that this Kiwi has found are made in hindsight, so it's easy to look back and say, well,
transferring out this expensive player that we expect to do well for this cheap defender
who never plays but came on for that one week and happened to score three goals.
Making those moves in real life is very risky and and it's very unlikely to pay off.
But of course, in hindsight, we can see that they did pay off. So this is like trying to pick a sort of lottery numbers in hindsight.
We don't really want to say that these moves, but the right moves to make,
we want to think more about general strategies that we can then apply in the future.
So that's the question I want to try and think about is can we use modelling to try and compare more general strategies,
these broad approaches that you might make when making your decisions in Fantasy Premier League?
And can we explore those with mathematics in the same way that we explore making similar decisions in cancer research,
cyber physics or whatever other area of applied maths that might be?
So the first question is, well, what should we model which of these hypotheses that we can think about should we test?
And we have a very sophisticated way of making those kinds of decisions, which Twitter.
So I went on Twitter the other day and I asked the wonderful fancy family community that's there.
Which of these problems they worry about the most. And top of the list by quite a long way was captaincy choice.
So each week I got to pick one player, just one player from my team, and I will get double those points.
So here is my team from some points in the middle of last season,
and most of my players didn't do very well, except for Mo Salah, who didn't score 32 points.
He scored 16 points. And so I don't know what that is.
A couple of goals and maybe an assist. And unfortunately, I've chosen him as my captain.
And so instead of getting 16 points, I got thirty two,
which is great because if I'd chosen different players like Kevin De Bruyne and instead of having those extra 16 points coming into my team,
I would only have had an extra two. So this is a really tricky decision,
which obviously people in the FPL world are worried about because it can really make or break your season can make a big difference.
And it's not an easy thing to choose. There's a lot of different ways that you might think about choosing your captain.
So what we want to do is think about some strategies and then come up with a way of modelling to compare them against each other.
So one one comparison, which often gets thrown about in the world of FPL, is the idea of form versus fixture.
Should I take a player who is in great form?
The last three weeks that scored every week they have in the time of their life, they're playing really well.
Or should I pick a player who's got an easy fixture?
Because although that player, you know, although Mo Salah may have scored in every one of his last three weeks,
now he's playing Man City away and it's a really tough match.
We're not really expecting him to do that brilliantly. But at the same time,
perhaps some other player who hasn't had a good run of luck recently has got a really easy fixture that might be playing Norwich home or something,
and you expect to score lots of goals and that's a real dilemma.
People don't know the answer. People genuinely have big arguments about this, so let's try and formalise it.
Let's try and use some modelling to try and understand it.
Have a way of doing this might just be well, I never captain a player who's playing away.
I only have some people that are at home. It's not a good thing or a bad thing.
And notice that these things aren't exclusive, you can be in good form and be playing at home.
You can be in good form and be playing away. Which one should I think about first?
Which one's most important? These are all the kinds of questions that we can ask.
You might even just say, Well, I don't want to think about it.
I'm just going to pick the same caps and I'm going to set it at the start of the season and forget about it.
And whatever happens happens whoever that play. So we want to build some sort of model to answer these questions.
And the way that I'm going to think about doing that today is by essentially simulating a lot of teams.
So what I want to do is essentially make a load of of fake teams and pretend that they were all starting from the start of last season
and let them play and let them choose their captain based on whichever strategy it might be and see how many points they would have got.
So one way of doing this, and I have to invest that I'm going to talk to you about and it's to simplify the problem,
so we don't want to worry about transfers, we don't want to worry about choosing our entire team of 11 people.
We don't want to worry about how we allocate our budget. We're only interested in who we make the captain.
So most teams have somewhere between, say, two and five players that they would probably be willing to make their captain in any given week.
So really, we're not interested in all of the other players. We just want to look at this small pool of people.
The players are choosing from Fantasy Premier League players as opposed to football players.
These managers are choosing from in order to make them their captain.
So I picked up a list of people here picks essentially every player in the game who costs more than nine million pounds,
plus a couple of other players less than nine million pounds, but a very popular options.
And that's going to be my my pool of possible players so I can have in my team.
And then I'm going to simulate a team I'm going to pick, say,
two to four of those players at random and say that four team number one, those are the two to four players that I've got.
And then I'm going to choose a strategy for that team to stick to it for the season.
Do I make transfers based on whether they're at home or why, based on who's in good form?
And every week I'm going to look at the data that's available up to that point and make that decision.
And then I'm going to do that 10000 times and we'll see over the course of those 10000 iterations which of those strategies as the most
successful reason we can do that is that we're now controlling for all of these complicating factors that we don't have to worry about.
We know that all of these teams were made in the same way and we know exactly what factors they're taking into that decision.
We don't have to worry about whether it's true that in this occasion,
we should have captained a defender who happened to score a hat trick because that's that's not the type of answer that we want to look at.
We want to look at whether the general strategy gives you more points or not. So we've simplified the problem down.
So now let's answer the question from my 10000 teams.
I'm going to pick a random player from my from my captaincy choices that's either at home or is playing away.
And over the course of of those 10000 teams,
I can look at how many points that would get me during that season, and I get something that looks like this.
So this is called a violin plot because it looks exactly like a violin.
And what it does is it shows me the distribution of points for all of the teams that were playing at home or all of the teams that were playing away.
So essentially, where this plotting is white,
the show is that there are lots of teams that scored that number of points with that strategy, where it's very narrow.
This means that there were a few teams that managed to score as many as 500 points with the strategy of choosing an away player.
And by comparing these side by side, you can see quite happily that if that's what you're making,
your decisions based on, choosing players that are at home is better than choosing players that are way.
It's not always gotten to be true.
You know, perhaps you happen to choose players that are away when they score points and you end up in this season's higher up here.
Where is your friend who chooses players that are playing at home who just happen to have bad weeks end up down here?
So it's not something which tells us exactly how to act, but it says that in general,
if we choose players that are at home will do better than those of our rivals that choose players that are way.
So perhaps the more contentious debate is form versus fiction.
What should we do? Well, in exactly the same way we can measure based on player form.
But what is platform?
So I'm going to define it as just saying for that player, we look at the last four weeks and we look at how many points that scored.
So if you've had a good previous four weeks, you'll have a high form.
If you've had a bad week during that,
it'll bring your form down and we're just going to choose the player who's got the best form in terms of looking at the fixtures.
Well, fortunately, we can use something called FDR, but FDR, but this FDR over.
So this is the fixture difficulty rating, and this is something that the Premier League thinks is so important that they make it available,
on the other hand, the kind of front page of what this player is.
So this is Jamie Vardy looking ahead for the season that's coming up,
and his first fixture against West Brom has an FDR of two suggesting that they think that's going to be an easy fixture for Leicester.
Whereas when we get to the 27th of September, they're going to be playing Man City away.
We just got a maximum of five in the arts, the hardest as they can get.
So we can again look at the average of the next few matches or in this case, because we're just interested in making them captain for one week.
We'll just look at what they have to all of their matches and decide whether to make them cuts and based on the.
So when we flip over to these violent plots again, we get quite a clear answer.
When we're choosing players based on whether they're informal or not, we can expect to get around 400 points more captain,
whereas if we choose and based on just looking at how easy that fixture is, this bump here rises up.
So there's a lot of variance. And these again, you know, it's not a done deal.
Sometimes there'll be a good player you want to captain, even though they have a hard fixture and that might work out better.
But we can say is a model in general, and you're better off looking at the fixture difficulty than you are looking at the form for a captain.
So it's not something we would expect, so it's not something that we would.
Well, one way that we might think about this is by considering something called the gambler's fallacy.
So. A good way of addressing this is to think about something like dice rolls.
So if I roll the dice 10 times, I can count how many times so I can have one.
How many times do I get a two? Etc., etc. And I did that and I got this.
I didn't pull any buttons at all. My dice is clearly bad. It doesn't give me any one's fine, but it gives me lots of threes and fights.
So if I said I want to predict what the next I thought was.
Based on just looking at this, I might say, well, I think it's good of all the three or five.
It's definitely not going to be a one. And that's that's what the gambler's fallacy is, in a nutshell,
is saying a look at these past events, which are random and I'll make my decision based on those.
My coin has come up heads 10 times in a row.
Therefore, it's more likely to be heads or, hey, I'm due a tale I haven't had a tail in while must be a tails.
But actually, all of these things are random. The probability of of something random happening doesn't change based on on you.
Yeah, based on the roll of the dice, you've just had a flip of the coin that you've just had these things that are independent.
So if I roll more, more dice roll coin, but you won't get any numbers if I roll more dice.
You can see up to $100. I ended up with a lot more ones. Great.
So this purple line here is what I expect the distribution of dice rolls to be.
I expect that I should be getting all of these things equally.
So what happens if I roll more?
Well, I get closer and closer to getting the real distribution after doing a dice all 100000 times, and that's pretty much a straight line to.
So what does this tell us about cabinet choices?
Well. When something's random, the past performance doesn't necessarily predict the future performance.
So this graph here is showing Jamie Vardy again, and we want to know.
Over the course of the last season, how often did he score?
Zero points, one point two points? So you can see this.
This peak here shows that about 35 percent of the time he only scored two points or less.
But sometimes he scored as many as 16 20 points.
So. Can we think of this as like dice roll?
Can we think of what the distribution would be that this would come from and what we can?
We might do something squiggly like this and say, well, it's far more likely to get a two than a four.
So we'll put a big peak there. But this feels a lot like we're over forgetting something here.
We probably want some smooth approximation to this.
And there are there are ways that we might be able to predict mathematically exactly what distribution we expect this to be from.
We're not going to talk about this today.
Well, I'm going to do is I'm just going to say if there is some distribution here where week to week, we expect Jamie Vardy to score this many points.
So most often [INAUDIBLE] be well.
This bump is around three or four points, but occasionally [INAUDIBLE] be out here in the tale, scoring 19 20 points.
If if his score from week to week isn't correlated is is truly random,
then we don't know whether he's going to score highly in any given week and choosing him as my captain based on that.
Well, I don't know whether he's going to be in the tail or in this bump.
Well, this is a bit of an oversimplification because it may not be true that it's random.
It may be that if Jamie Vardy scores a hat trick, one week is full of confidence.
He wants to go out and score again. The next week takes more shots. And there are obviously a lot more statistics that you can go into.
And but in terms of an explanation for why, for why the difficulty of the fixture might be more important than the form,
this is quite a good one because a player who has been in bad form is more likely to regain that form by playing weaker opposition
and then than perhaps a player who is capable of scoring highly or capable of scoring poorly does against any opposition.
So. What about comparing all of these strategies side by side and how do we how do we do Typekit basically?
So these two on the left are our form vs. fiction story.
And again, we've got the home vs. away story, but I've also included three more strategies in here.
Do I just pick a random captain who might be Kevin Devono?
In which case I'll score 500 points, but might be someone else, in which case I'll school less?
Do I just pick a random captain each week and just change it based on, you know, flipping a coin?
Or should I pick the most expensive player that I've got in my team and hope that that means they'll score well?
All of these strategies give us different expectations of how many points we'll get.
But it's not. Yeah, it's not a done deal.
You can't say for certain.
By following the strategy, I will do better than following Strategy B. But as we've said, these strategies aren't necessarily unnecessarily.
Able to block each other, right? I I can have a player with good fixture.
Maybe I've got two players with the same and same difficulty of fixture.
Well, then should I look at their form as a tie breaker? Should I look if one of those players is playing at home or not?
So again, we can use simulated results to to prioritise what happens if I pick the player that's got the best fixture difficulty and then I compare,
do I tiebreak using that form or do I type using my at home?
Turns out it doesn't make any difference. Same for tiebreakers.
If I start off with the player with the best form and then use fixed difficulty as a tiebreaker.
In fact, none of the tiebreakers seem to make an awful lot of difference, which may be says to us as fantasy football managers,
we shouldn't worry too much about the finer details and just focus on getting in players for the easy
fixtures and not worry too much about whether they're at home or away or whether they're in form.
But as you can see, when I compare all of these side by side,
you get a slight bump for starting off by looking at that fixture difficulty, but it's not a lot.
There's still a lot of variation and here that I'm going to talk about that later. So that's that's our first model.
But now I want to go back to this poll and think about looking at a different hypothesis.
So. What we want to do is try and build on the type of model that we've just made and see whether we can answer any more complex questions.
So the most complex question on here is transfer strategy. How do I decide who to bring into my team or who not to bring into my team?
Can I build on my model in order to try and answer that question?
Well, let's think about simplifying.
We started off just by thinking about two to five players, so our next problem is how do we pick a starting eleven?
How do we actually choose a team to start with because we can't make any transfers if we don't have a team?
And that's a hard problem. It's mainly a hard problem because we have lots of these restrictions, so we need 11 players.
We can't have any more than three from a team. So it's not as simple as just saying who does best and we have a budget to stick with them as well.
And ultimately, we're going to be able to transfer those players in and out.
So the first step to this to building up to this problem is to think about a set and forget team again.
We're going to forget about transfers for a moment and just say, how do I pick 11 players within that budget?
And I expect to do well. Well, this is quite a well known problem within months is the exact problem.
So why are of thinking about this is to say we've got a knapsack?
Well, what if the type of practises and it can hold up to 15 kilograms in weight?
And I've got some items that I can take with me and they all way a different amount and they're all worth different amounts.
So Lockwood, one pound, one kilo. The big bet would Gold Bar were three pounds, two kilos, probably not real gold.
But then, you know, we can have community shields, which are worth a little bit more and at the top of the scale,
most valuable is the FA Cup, which weighs a lot but also gets you a lot of value.
So the way that the knapsack problem works is it says, how do we maximise the value of what we take with us?
What do we put in our bag? Do we want to have a few heavy things that are worth lots of money, but we can only take maybe one or two items?
Or do we want lots of light things stuff in as many wooden blocks as possible?
And well, an obvious way to think about that is to say, what's the best value for money?
You know, are wooden block is gets us £1 for every kilogram and our Community Shield gets us £1 for every kilogram.
So it doesn't really matter if we have 15 kilos worth of community shields or wood blocks, it's still going to be worth £15.
So when we then look at the value for money, for the other things and see the best value for money, that was our FFA Cup.
So perhaps we got to get as many FA Cups as we can and then move down the list.
Well, it's kind of a natural way of thinking about this problem, but it doesn't really work for fantasy football.
The problem being that player prices vary over the course of the season, so the more people that buy a player, the more expensive they will become.
And if you own them, you as a manager are able to sell them to get yourself a bigger budget.
So you've essentially got a knapsack that's that's changing size over the course of the season.
And at the same time, we don't know how many players, how many points each player is going to score.
So we don't actually know what the value of these places makes it very difficult to say, well, who gets the most points per million pounds?
Maybe we can look at previous seasons, but that won't necessarily tell us what's going to happen this season.
There's also another problem, which is that although although expensive plans do well,
our players come in different positions, so an expensive defender is going to be cheaper than a cheap forward.
Most defenders cost around five or six million pounds inside the game and six million pounds.
You're expecting to score a lot of points for a defender,
whereas if you have a forward worth six million pounds, you'll maybe not expect them to get many points at all.
So should I stock up on expensive defenders rather than expensive forwards?
Cheap defenders. And that's the kind of problem that most fantasy football managers have right now trying to choose a team for the next season.
So rather than try and think about points per million or trying to use price as a way of telling us the
value because our expensive defenders will show up as being less valuable than our cheap forwards,
I'm going to simplify the game what we're doing, we're always trying to simplify the problem and find find a way of attacking it.
So I'm going to give every player a new value to try and bring them all onto the same scale.
And the way I'm going to do that is I'm going to arbitrarily label them not one,
two or three and the players that are worth not are likely to be the cheapest players in that position.
So off to the table here with the prices that I've used.
If you're kind of particularly interested in doing this type of calculation yourself, these are the assumptions I made.
So you can see here the premium price bracket, the players.
I expect to get really good value for money or a lot of points.
And these are the players I expect to be getting a lot of points and a very different price points, depending on their position.
So a premium goalkeeper might cost £6million, but the premium midfielder is more like 10 million.
So. That basically means I can now just forget about cost for a minute.
I'm not going to worry about my £100 budget, my 100 million pound budget.
I'm just going to worry about this No. Zero one two three.
That's like the weight in the knapsack problem. And I'm going to choose 11 players with a combined value of up to 21 y 21.
Completely arbitrary number that I just made up. So. Models are full of assumptions that we have to make.
And my assumption is that that probably gives me about the right number of the right balance of premium players to cheat players.
But it is something that I'm assuming, and I'm going to be very interested in looking at different thresholds of that different sizes of my knapsack.
It's just a simple way of being able to restrict my initial thing because it means if I want to have lots of players from that premium price bracket,
I'm going to need to fill up the rest of my team with players that aren't likely to score many points at all.
Or equally, I could say I'm not going to have any of these premium players, but I'm going to make everyone in the team kind of middle of the road.
And so we can again do our 10000 simulated teams and choose these these starting values at random.
See what the people who have lots of expensive players score compared to the people that time.
And you'll be very surprised to hear that having more expensive players gives you more points.
And so that's a good thing from a modelling point of view.
We've got a result which coincides with our intuition.
What most players want to do is try and put in the expensive plans that they think
will score big points and then fill up the rest of their team with whoever they can.
And in general, having having a more expansive team in terms of the value that I've assigned is better.
But we can also say, Well, let's compare, for instance, all of the teams in this pink bar,
all the four teams who cost 20 of my arbitrary value and we can look within there and say,
well, how many of those players come from that top premium price bracket?
And so that's what we do within that within those teams, which cost 20.
We can see that those which have a higher number of top price players do better.
So those teams, which had six of those high value three point players,
they only have two points to play with to fill up the other five places in their team.
And yet those teams still do better than the ones which have a much more balanced with maybe only one expensive player,
but filling the rest of that team with one or two point plans. So that's kind of interesting.
This is a good step towards the the way of building an initial team that we want to do.
We're getting realistic initial teams, but we can start to look at some other questions of this model.
So for each of these teams, I've chosen 11 players, but I've chosen them in a legal formation.
One of the formations that you're allowed to choose. And I can compare those things.
So do I have three defenders, four midfielders and three forwards.
And what's imaginatively known as a 3-4-3 formation?
Or do I have five defenders, four midfielders and one attacker, which you'll be surprised to hear is a five for one?
And happily, it doesn't seem to make a huge difference what I do.
There's very slight bias away from having five defenders,
which is a point that you should remember because I'm going to come back to it in a
moment because what we're really interested in doing is making this model more complex.
We want to increase the model complexity so that we can think about transfers,
but we can't really make transfers based on this because removing a player with a
value of three is very different if they're a forward versus being a defender.
We can't do that swap in the game because the defenders are much cheaper than the forwards and there are different positions.
So we need to think about real prices and real transfers to build on our model,
which means that we can't just use that simple way of choosing an initial team.
We do need to think about the budget. So instead of allocating my twenty one arbitrary points amongst my 11 players,
what I'm going to do is I'm going to choose a team initially completely random,
so I'll set my formation three four three and I'll choose a random player for each of those positions.
And if we're within the budget, I'm going to pick one of those players at random and I'm going to upgrade them.
And all that I'm going to do is look at the players for the more expensive than them,
and I'm going to spot them out so much more expensive and I'm going to keep doing that until I've got my team sorted.
So this is called Pythagorean Theorem, because Pythagoras famously thought that more expensive football is probably better.
And so we can use this model and move on.
But hold on a moment. We haven't talked about transfers yet, but what we have done is give a different way of making an initial team.
We've got a second model. And if we don't make any transfers, then that's exactly the same as the previous one,
so we can compare these things together and see whether we get any difference in those models.
So remember the formations that we looked at a moment ago? That's this box on the left here.
But now if we look at the the new version, we can see much more of a difference in the formation.
So in particular, think about the 5-4-1 formation. Lots of defenders, not very many and not very many attacking players.
And yet, these teams are scoring much more than the five for one players were relative to the rest of the teams in our original model.
So there's something funny going on there. There's also something funny going on with the the y axis.
So you can see for our new model, our teams before doing any transfers or captains are scoring around 4500 points in a season,
whereas in our original model, they were only scoring around twelve hundred.
So we need to try and understand how our model assumptions are affecting the results that we're getting out.
Well, in terms of the schools being higher, our new model actually uses the full budget.
There's no guarantee in our previous model that we might have lots of cheap plans and be leaving lots of money on the bench,
which is going to correlate with lots of points on the bench.
Whereas our new model does doesn't do that, so we can expect to get slightly higher results.
But we're also having a bit of bias because if you remember the way that I'm choosing
plants in my new model and I just pick a player at random and I make them more expensive.
Well, if I pick a defender at random who's a bottom of the line, four million pound defender and I upgrade them,
there's only a few price points before they become a six million pound top of the line defender,
whereas upgrading our bottom of the line £4million forward,
they've got an awful long way to go before they become the most expensive player in the game at 12 million.
So the way that I'm setting up my model is introducing a bias.
I'm more likely to have premium, high point scoring defenders than I am to have premium point scoring midfielders and attackers.
And I think that's why we see this, this bias here. But as I add more players into my defence, I see a step up in the points that I'm able to score.
So in the most famous quotes in mathematical modelling, it's from George Best, who said that all models are wrong.
Some models are useful, and that's a really important take home message is that when we're making these models, we're making simplifications.
And those simplifications will mean that we're not we're not dealing with the exact same system.
We are making things simpler, therefore we are making things wrong.
But just because they're wrong doesn't mean that they're not useful.
When we design a model, we design it to look at a specific question, and we don't need it to be perfectly accurate in all of the other areas.
We just need to design it carefully enough to be able to address the question we're interested in.
So with our new model, what's the question we're interested in?
Well, we want to compare transfer strategies with each other.
We want to know how I should be making decisions about who to bring in and who not to bring in.
That's something that's really hard to do just from looking at the data.
But in this mathematical modelling framework, because where we're simulating teams with a known strategy, we can start to compare that.
So I'm going to make the assumption that I can make zero or one transfers every week,
and there's some more complexities in the game where you can make more transfers, you can save transfers and use them in a subsequent week.
I'm not going to worry about them for the moment, just going to say every week I can,
I keep my team as it is or swap out one player for a different one.
But how do we prioritise its transfers? That's the first question me to answer.
Do I look at my team and find the player that I like the least and get rid of them and bring in whoever I can afford that is left outside?
Well, do I look at my team and say, Well, do I look at the players that I don't have and say, which of those players do I most want?
And then look at who in my team I have to get rid of in order to bring them in.
And then when I'm raising my players or the players outside, how do I rate them?
Also, look at the same things when I was investigating captaincy. Do they have good fixtures?
Do they have home matches of any good form? And again, as before, we can compare these these strategies.
So these first two violin plots where we value a player most if they have good fixtures coming up,
the second two are if we value a player the most because they're in good form, scoring well.
And finally, do we value them because they're playing at home and there's a clear winner in there,
which is that we should make transfers based on the recent platform.
So if you remember our captaincy model, this is completely the opposite conclusion.
In that model, we said that the form wasn't very important and that we should just look at what the fixture is.
Well, why is this? If you remember our gambler's fallacy.
Example for picking a captain, we're trying to choose a player that's going to do well that specific week and
our best chance of maximising that is to choose someone who has an easy fixture,
good opportunities to score. But when we're making a transfer, we're looking at a longer time period.
We want those players to sit in our team for a longer period of time and during that longer period of time, if they were plan,
that is in good form and is able to to score well, they're more likely to to hit those the tail of that distribution.
So think about this Jamie Vardy example. If we just have him for one week, we're more likely to hit a two point seven to twenty point two,
whereas if we have him for the whole season, we know that we're occasionally going to get high scores in this title.
So we don't necessarily want to bring a player in just because just because they we expect them to do well in one particular game.
But having players that score well over the long term is something that we should be looking to get from our transfers.
So in terms of which transfer strategy as best, we think a lot about form versus fixture.
But actually the other question we raised is a bit more a bit more interesting.
Should I make my transfers based on bringing a player in or based on getting a player out?
And I think a lot of fantasy football managers see a player that they don't have and do really well,
and they think I have to earn that and then they tear apart their fantasy football team in order to get that player in.
And it doesn't pay off, whereas actually, although a very expensive player may have scored very well that we don't own.
We're probably better off sticking to our guns with our expensive players and getting rid of one of these
other players that isn't returning the points and replacing them with someone who we can't afford,
even if they're not the person that just scored a hat trick. We still want to replace them with the best player we can,
but our priority should be on looking at getting rid of those players that aren't performing.
So what have we found out? Well, hopefully we found out from a scientific and mathematical point of view,
and we can think of science as being this process of reducing complex problems down to statements that we can test,
and we can think of mathematical modelling as being a tool which we can use to help explore these statements.
And in particular, I want you to go away with the idea that maths and science aren't just subjects that you study at school.
The ways of thinking about the world. Ways of tackling complex problems.
Whether those problems are fluid mechanics. And whether a how a plane can fly best or Formula One car can drive best.
Whether those problems are to do with with cancer research or modelling the spread of coronavirus,
or whether those problems are to do with choosing your fantasy football team,
maths and science a mindset that you can take to the world to tackle problems and to break those problems
down to ideas that you can test also want you to remember the mathematical models aren't perfect.
They can't tell us exactly what's happening because by definition, a mathematical model is a simplification of the world.
But that doesn't mean that they're not useful. They may be wrong, but they may be useful.
Remember, George Box mathematical models can give us a really deep insight into how a system works, which parts of that system are important,
and which parts we should focus our efforts on, whether that's making transfers or whether that's prioritising how we treat the disease.
So what do we take away from this in terms of fantasy football? Well, did I do the right thing?
I have some hypotheses. Did I win because I was following them?
Well, in terms of my new hypotheses and definitely going to keep focussing on getting rid of
underperforming players rather than bringing in players who have just done well recently.
But I'm going to start thinking a lot more about fixtures over form when I'm setting
my captain and more about four major fixtures when I'm making my transfers.
It's not to say that I'm going to ignore the fixtures, but I'm definitely going to take these insights into account when I'm making my prioritisation.
Probably most importantly, I'm still not going to pick a lot from Norwich, and that's still a good hypothesis to have,
even even when they're no longer in the Premier League and just in general to take it as gospel truth.
So can you tell us how to win fantasy football? Well, not really.
But also sort of it can tell us which strategies are most likely to be successful.
But all of the graphs that we've seen have got this huge variation where by following the same strategy,
you can end up with a low number of points or a high number of points. And that variance is it's part of the game.
It's there for a few different reasons. Just because you're making transfers based on statistics doesn't mean that you understand football.
In order to make sensible decisions, you need to think about plans that are going to do well.
Plans that you think looked tired, plans that you think always perform well at home, they always perform well on a Friday night.
They always perform well when it's raining. You bet. All of that football knowledge is what goes into reducing that variance.
But at the same time, there's a lot of luck involved. And you may be making perfectly good decisions, but it just didn't pay off.
You know, that player did everything they could, but they had a million shots on goal and they just still got sites.
They were just unlucky. And if your players are unlucky, then as a football manager, you're unlucky.
And so remember, the time variance is always going to be there and remember that it's a game and go and enjoy it.
And in the first group that I haven't butchered and other than the addition of fantasy football, it's a serious business.
Take it seriously. Think about the maths. Thank you very much for listening.
I just want to say a huge thanks to a bust of Anand, who I've never met and never talked to.
But who does have all of this data available on GitHub? And and that's the dataset that I've been looking at for this talk.
So thanks very much to him for compiling all of that.
If you want to have a goal of beating me and beating the other mathematicians that are watching this talk,
you have a fantasy football players that are watching this talk and hop on to the Premier League website and make a team.
You've got until until an hour before the first Kick-Off, which is it's either Saturday, the 12th for might be an ugly game.
Think it's Saturday? And, yeah, make yourself a team.
Put in this code here to KB K2 and come and join us.
Come, come and play God. Thank you very much for listening.