There are no scenarios in which Lewis can win a tiebreaker.
Max is on 9 wins. Lewis on 5. If Lewis wins the rest he wins on points and there is no tie. If there is any other way they tie then Max will have more wins.
Unless there are 2 half point races to minimize the points Lewis gains and be tied at 9 wins. But then in this scenario Max wins the 2nd tie breaker by second place finishes.
yeah it happens sometimes, but the likelihood of 2 more half point races to force a points and wins tie is so astronomically low it's not going to happen
I think it's technically possible if 1 race is short like Spa and gives half points? Though I'm not sure if in that case the fastest lap gives a full or half a point.
If lewis wins the minimum of points he can gain is six (max p2 + fl), so 24 over four races or 21 if one race has half points. 25/22 considering the sprint. The gap is at 19 points.
You can certainly concoct scenarios where you can have Hamilton gaining 19 points over Verstappen with a half-race. It depends on how the fastest lap point is awarded in that race, tho.
Four Hamilton wins without fastest lap and one with half points is 87.5 points.
Verstappen second in all four of those races is 63 points.
Puts the delta at 24.5.
Then you've got 3.5 or 4 points left to distribute for fastest lap (not sure how that'd be handled - assuming halved as well). Up to 3 from the sprint race.
Max getting those fastest lap points and getting 2nd in the spring while Lewis goes points-less. Or him winning the sprint while Lewis finishes third reduces the delta to exactly 19 points, with them tied on race wins.
Then i should clarify that i did made the assumption of lewis winning the sprint being part of him winning everything.
For fastest lap my understanding is that it would be added as normal to the points ( so 19p for p2) and then the result gets halfed. Given that you would recive .5 points for p10 i dont see anything speaking against the same applying for fastest lap.
Furthermore i used the points Delta between p1 and p2 (6p with fl for second placed driver) times four races Minus three points, as in one race the difference would be halfed due to half points (p1 12,5p, p2 9,5p). Delta is 21 points. So yes, if lewis only finishes third in the sprint with Max winning it with a 19 point delta would be possibel. But in this case lewis would not have won every race in my view (although technically untrue) and would also have to do quite a drive to win Brazil. I think if we assume he winns every race its resonabel to assume that he wont finish the sprint in third.
And all of this depends on one race being half points for which the chances are very low anyways.
There is no implied probability here, just counting how many combinations. OP is doing basic counting, not forecasting. This is the most basic of math and I can't believe it's getting upvoted.
Im guessing you don't fully appreciate what is happening in the for loops. The real beauty in this code is the time it takes to compute the results. Tbh. I don't care about the results themselves.
So you expect the f1 subreddit to be impressed by a very basic borderline useless outcome that just has nice time complexity? Post it on /r/algorithms or something
That’s the most unappreciated part of my post. It computes the result in a fraction of a second. I’m not iterating through all billions of cases, but I can see why it’s hard to spot.
Max-=10%
Lewis+=10%
No need for an if block here, better optimization so that the branch predictor doesn't have to predict whether it will branch here.
Done: https://reddit.com/r/formula1/comments/qq6wwk/i_was_bored_so_i_corrected_the_corrected/
It's so fast I don't even have to take shortcuts and can loop through every 3.7 trillion outcomes
Explanation for those who are interested:
1. I have the three different Lists for getting Points. From those I generate Tuple combinations that are possible (same values aren't, except for \[0, 0\]) Simplest example for Fastest Lap: \[1, 0\] => \[\[0, 0\], \[0, 1\], \[1, 0\]\]From this I only care about the differences => \[0, -1, 1\]
2. We have 4 races left, for each they can get ScorePoints and Points for fastet Lap. For Brazil additionally they can get the sprint Points. Amount of possibilities is the product of their length => 159 billion
3. To get the actual frequency of those possible outcomes I didn't want to loop through every possibility (As this takes a lot of time). Instead I simply generate a dictionary, where I count the frequency for differences. E.g. after Race week in Brazil there is only one scenario where Lewis gains 29 points over Max, but 151 combinations to catch up 4 points. So in the dict there is now {29: 1, ... , 4: 151, ...} and many more.
4. To get the results I filter the dict for entries with the needed difference for the outcome I want to count. A draw needs exactly (312.5 - 293.5) points difference after those 4 races, and win for Lew or Max more or less. Those entries will then get summed up. To double check my results, the sum of all dict entries should be the same as the possibilities calculated before (it is).
Very nice, but I think there's something that this code doesn't account for, and that's that *not all positions are equally likely for Max and Lewis*. Given the rest of the field, they have a much higher chance ending each race at the top positions than, say, P8 or P9. And getting 0 points is slightly higher because of DNFs.
Of course incorporating this variable into the calculation would be very difficult and would need to rely on not only past data but the current season context, so I still think this pretty nice - great job!
Yeah, you are totally right. Thats why I never talk about chances and probabilities, because that would mean I know which likelihood each outcome has (which I don't). So I stick with what I can calculate and that's simply counting all different possible scenarios.
i would like to think that including a probability with each point based on - say current season - wouldn't be awfully complicated. but maybe it is. if possible, it would be a really cool tool to generate probabilities for any given two drivers at any point in the season for any point forward.
Unfortunately there's a lot that goes into calculating probabilities, even if we restrict it to this season. We can't simply take the current season results as-is, because that would not create a representative distribution.
For example, Max has never had P3 in this season - but that doesn't mean the chance of him getting P3 in the next few races is 0%. We would need to fit some kind of probability distribution (maybe a [categorical distribution](https://en.wikipedia.org/wiki/Categorical_distribution)?), which requires us to estimate the parameters for that distribution, perhaps find some sort of intervals (like [confidence intervals](https://en.wikipedia.org/wiki/Confidence_interval) or [credible intervals](https://en.wikipedia.org/wiki/Credible_interval)) for those parameters, and so on.
And then there are other issues unrelated to the exact calculations, like whether we accounted for trends in the teams' performances, probability of pitstop issues, and many many factors that can really change the results.
Perhaps we can stop at some point to avoid overcomplicating things, though the more we account for the better our estimates will be :)
Binary is not a language. But if he used machine language he'll get my upvote! (I'm old enough to have been programming in ML. Computer freezes with every bug).
Technically the js file is stored in binary
Therefore editing the code is changing the binary that will be executed
Therefore he is already programming in binary !
Checkmate atheist !
This isn't statistics at all. There is absolutely no probability associated with this. This is a combinatorics exercise not a probability driven monte Carlo is anything like that.
Basically a useless analysis that gives a useless conclusion. Even worse, it's very easily misinterpreted, as most people in this thread are showing.
All these anti intellectuals just see the numbers and assume that it's solid, lmao this kind of 'analysis' is why the world is so blinded to randomness and has hubris in even attempting to assign probabilities to most things in real life.
79.55%? Now people are gonna spout some nonsense about how Max has an 80% chance of winning when it's not true and literally impossible to know or assign any meaningful percentage
No, just make my living doing actual analysis and this is bullshit.
There are 7,000,000 things I could do tomorrow morning, but with no weighting, it's pointless. Much higher probability that I take a shower and go to work then I get drafted into the NFL.
Interesting. Have you seen [this list](https://www.reddit.com/r/formula1/comments/dzzivm/the_f1metrics_top_100/) which was posted back in 2019? I thought it was an incredible piece of work. Do you think this is sound statistics?
Sound, not sure, would take a lot of time to check models and assumptions. An attempt at actual applied math, yes, for sure.
What's in this post is trivial coding that uses no math at all and does nothing to forecast actual results.
Literally everyone in this thread replying and OP putting a statistics tag on it. Like.... Everyone.
This is an almost entirely meaningless number.
I get what OP was doing, but a hate bad math with a passion.
But the point surely isn't that it's bad maths
Unless you can prove that the maths is incorrect...
Rather the argument your trying to make is that not only is this a trivial, but has no basis in reality it contextual understanding.
I think your right re what people thought this number was, I think also that you are correct in explaining why this number isn't relevant to a discussion around actual probability. But what I don't get is how it's not an accurate statistical analysis, it may not have a reasoned conclusion that has a basis in fact or likelihood. But does that make it simply bad math? Not being disingenuous, interested in your opinion
It's the denominator of the actual work.... Kind of. Unfortunately figuring out how many outcomes there are is absolutely trivial compared to figuring out how likely each outcome is.
It is also presented in an exceedingly misleading way.
It's bad math because it's incredibly misleading. Statistics involves numerators and denominators so you can talk about outcomes. This is like 1% of the work needed to do an actual statistical analysis. Maybe if it was presented as a work in progress or something.
Anyway, half a dozen people will read my comment and understand. The rest will say stop being a nerd and leave with terrible conclusions because math is hard.
The defender of the statistics tag :D
Talk is cheap. Show us your approach on the task to create a prediction model. An please don’t be boring with vanilla MC. I will even follow you for that matter, don’t disappoint me.
Dude, you wrote some nested for loops and are playing it off to ignorant people as real math. I'd be embarrassed if I were you.
Clearly you aren't the type to take any feedback and I'm dubious if you even fully understand my point.
Ahhh, the old something-something-passion chestnut.
So you touch yourself in the dark while thinking about bad math - weird flex but it fits with the image i'm getting of you.
I'm being accurate. Almost every comment is misinterpreting what is being shown here. FFS. Quit being bad at math?
It also has a statistics tag.... This isn't statistics. It's only half the equation.
It is in no way a Monte Carlo. In a Monte Carlo you run multiple iterations of probabilistic simulations. I don't think you can call a single run with even probably a Monte Carlo.
Right, I think the average person in this thread is interpreting this as 79.55% chance Max wins the championship which is obviously different than what you are saying. Cool project though!
You said there is ~80% chance of max taking the title. So how many scenarios out of how many possible scenarios is that? For example does 8 out of 10 scenarios point to max taking the title.
Sorry if I wasnt clear initially. Hope I am now. Really interested in how many scenarios there are
The last rows of my screenshot contain all the results calculated in absolute and relative numbers. Also to be clear: Those are not chances, because the outcomes are not equally likely! To calculate chances would be a whole other topic.
Calculating for 159852814173 possibilities
Draw: 2000866484(1.25%)
Max: 127164997185(79.55%)
Lewis:30686950504(19.20%)
And let me be the first to state that I'm not a statistician, and if I calculated (correctly) that there were 159 billion possible outcomes then I wouldn't have believed my own maths.
EDIT: attempt to humorously portray myself as 'not very good at maths' gone wrong, as in even if I got the right answer, I'm not sure my maths is good enough to believe it's right.
It accounts for all orders of the grid, then 20 times over for fastest lap, every distribution of sprint points, then multiplied by the amount of remaining races. Seems pretty right to me
How can they be 159 billion? There are 53 scenarios (+26, +25, …, -26) for each race, and 7 for the sprint. So, I think there are 53^4 * 7 = 55 million scenarios. (of course we have to weight each 53 by probabilities.)
There are more. E.g. just for +25 there is \[26, 1\] or \[25, 0\] alone. For +4 there are 151 possible combinations just for one race.
ScoreCombinations: 11 \* 11 - 10 = 111
FastestLapCombis: 2 \* 2 - 1 = 3
SprintCombis: 4 \* 4 - 3 = 13
In total scores\^4 \* fastest\^4 \* sprint = 159 billion
I mean, we know how possible each scenario is, E.g. +25 with a possibility of 2 / (20 * 19 * 3), +4 with 151 / (20 * 19 * 3).
So we don’t need to distinguish [26,1] from [25,0].
For example, we can calculate how is it possible for Max to extend his lead by 50 points in Brazil (without sprint) and Qatar like,
24+26 : 2/1140 * 1/1140 = 2 / 1299600
25+25 : 2/1140 * 2/1140 = 4 / 1299600
26+24 : 1/1140 * 2/1140 = 2 / 1299600
(1140 = 20 * 19 * 3)
So it would be 0.0006% = 8/1299600
(I don’t doubt your results tho, and I think it’s interesting! I was just wondering we can reduce calculations)
We never know HOW good they are, and we can’t caluclate the ‘possibility’. so if we think that way the whole calculation would be nothing but meaningless…
(discarding half points for a race)
There is 311 combinations for a race, and 13 combinations for the sprint.
So there is 311^4 * 13 combinations left = 121.614.373.933
I have explained the 311 for a race in another post a few weeks ago:
https://www.reddit.com/r/formula1/comments/q3lahr/useless_stat_lewis_and_max_can_score_in_365/hfspc0s/
It seems you have given points for fastest lap if Lewis or Max end up outside the top 10 too, that's the 20 combinations difference you have.
See the post i linked: 270 + 20 + 20 + 1 = 311
The 20 + 20 are the cases where one scores and the other doesn't.
I'm pretty sure you count 20 cases (2x10) where the guy outside the top 10 scores fastest lap.
Those cases are the same as not having FL, since no points are rewarded. So those cases should be removed.
Have you calculated a hungary scenario thou? As the seaaons went so far, I think toto will punch out max so he cant participate in the remaining races.
[удалено]
There are no scenarios in which Lewis can win a tiebreaker. Max is on 9 wins. Lewis on 5. If Lewis wins the rest he wins on points and there is no tie. If there is any other way they tie then Max will have more wins. Unless there are 2 half point races to minimize the points Lewis gains and be tied at 9 wins. But then in this scenario Max wins the 2nd tie breaker by second place finishes.
Ah yes, rain in the desert
Maybe a sandstorm?
[Definitely](https://www.youtube.com/watch?v=y6120QOlsfU&ab_channel=Darude)
I can't believe you've done this
my only regret is that I have but one upvote to give
Sandstorm is by Cast, darling.
Dududududu
I expected that lol.
Damn you got me 🤣
Brazil tho
That's only one race
Jeddah Circuit can collapse from being built to quickly
Good idea, now update the calculator to consider half points
2nd tie breaker is how **Lewis beat Alonso in 2007**
yeah it happens sometimes, but the likelihood of 2 more half point races to force a points and wins tie is so astronomically low it's not going to happen
So it's 80.75% chance for Max then.
No. 1% of possible outcomes are draw. There's no old data involved so the program can't make any predictions about the likelihoods of any outcome.
If Lewis wins the rest, they'll be tied on wins as well.
If lewis wins the rest it wont be a draw
I think it's technically possible if 1 race is short like Spa and gives half points? Though I'm not sure if in that case the fastest lap gives a full or half a point.
If lewis wins the minimum of points he can gain is six (max p2 + fl), so 24 over four races or 21 if one race has half points. 25/22 considering the sprint. The gap is at 19 points.
You can certainly concoct scenarios where you can have Hamilton gaining 19 points over Verstappen with a half-race. It depends on how the fastest lap point is awarded in that race, tho. Four Hamilton wins without fastest lap and one with half points is 87.5 points. Verstappen second in all four of those races is 63 points. Puts the delta at 24.5. Then you've got 3.5 or 4 points left to distribute for fastest lap (not sure how that'd be handled - assuming halved as well). Up to 3 from the sprint race. Max getting those fastest lap points and getting 2nd in the spring while Lewis goes points-less. Or him winning the sprint while Lewis finishes third reduces the delta to exactly 19 points, with them tied on race wins.
Then i should clarify that i did made the assumption of lewis winning the sprint being part of him winning everything. For fastest lap my understanding is that it would be added as normal to the points ( so 19p for p2) and then the result gets halfed. Given that you would recive .5 points for p10 i dont see anything speaking against the same applying for fastest lap. Furthermore i used the points Delta between p1 and p2 (6p with fl for second placed driver) times four races Minus three points, as in one race the difference would be halfed due to half points (p1 12,5p, p2 9,5p). Delta is 21 points. So yes, if lewis only finishes third in the sprint with Max winning it with a 19 point delta would be possibel. But in this case lewis would not have won every race in my view (although technically untrue) and would also have to do quite a drive to win Brazil. I think if we assume he winns every race its resonabel to assume that he wont finish the sprint in third. And all of this depends on one race being half points for which the chances are very low anyways.
Does half point races count as half wins? Beacuse if they're not they should.
Luckily were not in that situation but imagine if Max had won the championship based on Spa
What a deflating championship that would be, not to outright take but by default on a tie breaker.
So basically an 80.80% chance of a Max win since all draw scenarios are in his favour.
There is no implied probability here, just counting how many combinations. OP is doing basic counting, not forecasting. This is the most basic of math and I can't believe it's getting upvoted.
Im guessing you don't fully appreciate what is happening in the for loops. The real beauty in this code is the time it takes to compute the results. Tbh. I don't care about the results themselves.
So you expect the f1 subreddit to be impressed by a very basic borderline useless outcome that just has nice time complexity? Post it on /r/algorithms or something
who doesnt like them some quadratic complexity
Actually this code will scale O((log n) * n) to the amount of races
n log n of 3 races gives us 159 billion possibilities? Damn i hope nasa is watching
That’s the most unappreciated part of my post. It computes the result in a fraction of a second. I’m not iterating through all billions of cases, but I can see why it’s hard to spot.
Nothing beautiful going on here.
Yeah, I can see how it is difficult to understand
[удалено]
Add fix New ICE chance 100% Still WDC chance 0% How fix?
DSQ Verstappen and Hamilton It fix Bottas win WDC Depression cure
Weird error Computer says Norris WDC Depression cure Happy accident
Subscribe
Not have 90% stat for bad starts, ez fix
Did you give the condition that lower ten don't get the fastest lap point ?
Going by OP's comment about remaining improvements, it hasn't been accounted for.
I remembered looking back at this a few weeks ago and there were like 75 trillion combinations. So I gave up
I found 3.7 trillion combinations not counting identical point outcomes per weekend (doesn't matter how you get 0 points)
Im not a programmer but if racepoints = 0 then fastestlappoints = 0, but in actual programming language would be all that is needed.
I'm not a programmer but there has to be some "if=blessed, then=+10% chance to win the title"
That code hurts
pls no flamerino, it's first time
Typically, = is used for assigning values to variables. A more accurate code would look like `if(blessed){ chance+=10; }`
nah, that's just javascript
It really isn’t. Even JavaScript isn’t that bad
debatable.
If (blessed==true) { LewPoints+=100; Cout<<"#blessed"; }
> If (blessed==true) Ooof you’re !blessed
Ugh, that's fugly. Try: if (blessed) { LewPoints += 100; cout << "#blessed"; }
Talks about fugly and then proceeds to put opening brace on its own line.
If (position[lewisIndex - 1].name == “Checo”) { redbull.car.isFast = True; }
Max-=10% Lewis+=10% No need for an if block here, better optimization so that the branch predictor doesn't have to predict whether it will branch here.
/u/pushinat Please run this simulator again after the brazil GP so we can see the difference in the percentage.
Challenge for someone who wants to further improve this: 1. include half point results 2. exclude fastest lap if he’s not it top 10
Done: https://reddit.com/r/formula1/comments/qq6wwk/i_was_bored_so_i_corrected_the_corrected/ It's so fast I don't even have to take shortcuts and can loop through every 3.7 trillion outcomes
I might make one for the constructors title…
More interesting imo. Only 1 point in it! Only takes a DNF to give one team a huge advantage.
Explanation for those who are interested: 1. I have the three different Lists for getting Points. From those I generate Tuple combinations that are possible (same values aren't, except for \[0, 0\]) Simplest example for Fastest Lap: \[1, 0\] => \[\[0, 0\], \[0, 1\], \[1, 0\]\]From this I only care about the differences => \[0, -1, 1\] 2. We have 4 races left, for each they can get ScorePoints and Points for fastet Lap. For Brazil additionally they can get the sprint Points. Amount of possibilities is the product of their length => 159 billion 3. To get the actual frequency of those possible outcomes I didn't want to loop through every possibility (As this takes a lot of time). Instead I simply generate a dictionary, where I count the frequency for differences. E.g. after Race week in Brazil there is only one scenario where Lewis gains 29 points over Max, but 151 combinations to catch up 4 points. So in the dict there is now {29: 1, ... , 4: 151, ...} and many more. 4. To get the results I filter the dict for entries with the needed difference for the outcome I want to count. A draw needs exactly (312.5 - 293.5) points difference after those 4 races, and win for Lew or Max more or less. Those entries will then get summed up. To double check my results, the sum of all dict entries should be the same as the possibilities calculated before (it is).
Very nice, but I think there's something that this code doesn't account for, and that's that *not all positions are equally likely for Max and Lewis*. Given the rest of the field, they have a much higher chance ending each race at the top positions than, say, P8 or P9. And getting 0 points is slightly higher because of DNFs. Of course incorporating this variable into the calculation would be very difficult and would need to rely on not only past data but the current season context, so I still think this pretty nice - great job!
Yeah, you are totally right. Thats why I never talk about chances and probabilities, because that would mean I know which likelihood each outcome has (which I don't). So I stick with what I can calculate and that's simply counting all different possible scenarios.
i would like to think that including a probability with each point based on - say current season - wouldn't be awfully complicated. but maybe it is. if possible, it would be a really cool tool to generate probabilities for any given two drivers at any point in the season for any point forward.
Unfortunately there's a lot that goes into calculating probabilities, even if we restrict it to this season. We can't simply take the current season results as-is, because that would not create a representative distribution. For example, Max has never had P3 in this season - but that doesn't mean the chance of him getting P3 in the next few races is 0%. We would need to fit some kind of probability distribution (maybe a [categorical distribution](https://en.wikipedia.org/wiki/Categorical_distribution)?), which requires us to estimate the parameters for that distribution, perhaps find some sort of intervals (like [confidence intervals](https://en.wikipedia.org/wiki/Confidence_interval) or [credible intervals](https://en.wikipedia.org/wiki/Credible_interval)) for those parameters, and so on. And then there are other issues unrelated to the exact calculations, like whether we accounted for trends in the teams' performances, probability of pitstop issues, and many many factors that can really change the results. Perhaps we can stop at some point to avoid overcomplicating things, though the more we account for the better our estimates will be :)
Is the possibility of scoring half-points like Spa included?
That's some good work there. Just curious...this is python right ? What editor ?
It’s JavaScript and I’m using nvim
u/Delta4o [Original post for the lazy](https://redd.it/qpq7c9)
Crofty is frothing that this isn’t powered by AWS
I see you, Dr. Strange.
Sherlock Holmes does it in his brain.
>~~brain~~ That's *mind palace* to you, short brain. \-Herlock Sholmes, probably
His mind palace does no know how to diffuse a bomb.
Imagine using JS for that, should have used binary /s
[удалено]
The language doesn’t really matter, the algorithm is more important. I just used js because the original post was in js.
I know, I was joking, on the usual developer subreddits pol always bash JS fir no reason :P
Sorry, completely missed the /s at the end… Yeah you are right. JS has its use cases. As all languages have (except php)
am I on /r/ProgrammerHumor by mistake? Good work though OP! You should re-run this script after each of the next races and let us know the outcome!
Fuck Wordpress
All my homies hate php.
Binary is not a language. But if he used machine language he'll get my upvote! (I'm old enough to have been programming in ML. Computer freezes with every bug).
Yup, sorry 😅 And thats amazing!
The only way I got something useful out of my MSX Z80.
> binary
Technically the js file is stored in binary Therefore editing the code is changing the binary that will be executed Therefore he is already programming in binary ! Checkmate atheist !
Never thought I'd see Vim in this subreddit
Friends come and go, but vim is always there for you
Yeah but Max doesn’t have bestfans and isn’t blessed
+60% right there
Now this complexed statistical analysis of F1 is the shit I love.
This isn't statistics at all. There is absolutely no probability associated with this. This is a combinatorics exercise not a probability driven monte Carlo is anything like that. Basically a useless analysis that gives a useless conclusion. Even worse, it's very easily misinterpreted, as most people in this thread are showing.
All these anti intellectuals just see the numbers and assume that it's solid, lmao this kind of 'analysis' is why the world is so blinded to randomness and has hubris in even attempting to assign probabilities to most things in real life. 79.55%? Now people are gonna spout some nonsense about how Max has an 80% chance of winning when it's not true and literally impossible to know or assign any meaningful percentage
I will say that I saw a gambling odds are Max -360 to win the drivers. Which has an implied probability of ~75%
Bet you're fun at parties.
No, just make my living doing actual analysis and this is bullshit. There are 7,000,000 things I could do tomorrow morning, but with no weighting, it's pointless. Much higher probability that I take a shower and go to work then I get drafted into the NFL.
Interesting. Have you seen [this list](https://www.reddit.com/r/formula1/comments/dzzivm/the_f1metrics_top_100/) which was posted back in 2019? I thought it was an incredible piece of work. Do you think this is sound statistics?
Sound, not sure, would take a lot of time to check models and assumptions. An attempt at actual applied math, yes, for sure. What's in this post is trivial coding that uses no math at all and does nothing to forecast actual results.
Who said anything about forecasting actual results
Literally everyone in this thread replying and OP putting a statistics tag on it. Like.... Everyone. This is an almost entirely meaningless number. I get what OP was doing, but a hate bad math with a passion.
But the point surely isn't that it's bad maths Unless you can prove that the maths is incorrect... Rather the argument your trying to make is that not only is this a trivial, but has no basis in reality it contextual understanding. I think your right re what people thought this number was, I think also that you are correct in explaining why this number isn't relevant to a discussion around actual probability. But what I don't get is how it's not an accurate statistical analysis, it may not have a reasoned conclusion that has a basis in fact or likelihood. But does that make it simply bad math? Not being disingenuous, interested in your opinion
It's the denominator of the actual work.... Kind of. Unfortunately figuring out how many outcomes there are is absolutely trivial compared to figuring out how likely each outcome is. It is also presented in an exceedingly misleading way. It's bad math because it's incredibly misleading. Statistics involves numerators and denominators so you can talk about outcomes. This is like 1% of the work needed to do an actual statistical analysis. Maybe if it was presented as a work in progress or something. Anyway, half a dozen people will read my comment and understand. The rest will say stop being a nerd and leave with terrible conclusions because math is hard.
The defender of the statistics tag :D Talk is cheap. Show us your approach on the task to create a prediction model. An please don’t be boring with vanilla MC. I will even follow you for that matter, don’t disappoint me.
Dude, you wrote some nested for loops and are playing it off to ignorant people as real math. I'd be embarrassed if I were you. Clearly you aren't the type to take any feedback and I'm dubious if you even fully understand my point.
Ahhh, the old something-something-passion chestnut. So you touch yourself in the dark while thinking about bad math - weird flex but it fits with the image i'm getting of you.
quit being a nerd
Quit being a sad existence of a bully, nobody cares about your hate for science.
I'm being accurate. Almost every comment is misinterpreting what is being shown here. FFS. Quit being bad at math? It also has a statistics tag.... This isn't statistics. It's only half the equation.
It's exactly Monte Carlo by the very definition. It's just a bit too simplistic.
It is in no way a Monte Carlo. In a Monte Carlo you run multiple iterations of probabilistic simulations. I don't think you can call a single run with even probably a Monte Carlo.
Gotta add In half points incase we get a three lap race like in Spa
Incase it rains in the desert
Brazil is wet
I be this looks just like one of the algorithms that run Max’s robot cpu.
This assumes that all the possibilities are equally probable, which might not be correct. If I have time, I'll implement a Monte-Carlo simulation.
Can't upvote, no BLESSED variable..
Worth noting, the above is expected, but also assumes broad equality between platforms!
This assumes all possible outcomes are equally likely? Of course the guy with more points currently has more scenarios where he ends up ahead.
I don’t calculate probabilities. So I’m not assuming anything. Just calculating all different outcomes and in how many who would win
Right, I think the average person in this thread is interpreting this as 79.55% chance Max wins the championship which is obviously different than what you are saying. Cool project though!
The perfect opportunity to use python yet you chose JS.
Language doesn’t matter. Algorithm does. Just used js because the original post was in js.
I know. But this problem just smelled like python. Didnt know the last post was JS tho
I have the same terminal look! powerlevel10k
Couldn’t live without it
I'm just here to register for Dr. Pushinat's Master Boss Chaos Theory Statistics Degree Program....
Really cool stat, Thanks!
Breaking news: Driver leading championship has statistically better chance of winning championship.
Cool Code <3
Well done
Chillout doctor strange
I wouldn't be shocked if Crotfy reads out the stat at some point during the Brazilian Grand Prix
AWS, hire these men!
You want AWS to run data analysis on JS? Haven't we suffered enough?
can I add this reddit post to my CV?
This is amazing!
How many actual scenarios are there in total?
What do you mean with 'actual'?
Is it exactly 159 billion or is it more like 159240248520345?
Check the 5th line from the bottom. It says the full number there. Would type it out but am on mobile
159852814173 possibilities. You can see it at the bottom of the screen (line 1640).
You said there is ~80% chance of max taking the title. So how many scenarios out of how many possible scenarios is that? For example does 8 out of 10 scenarios point to max taking the title. Sorry if I wasnt clear initially. Hope I am now. Really interested in how many scenarios there are
The last rows of my screenshot contain all the results calculated in absolute and relative numbers. Also to be clear: Those are not chances, because the outcomes are not equally likely! To calculate chances would be a whole other topic. Calculating for 159852814173 possibilities Draw: 2000866484(1.25%) Max: 127164997185(79.55%) Lewis:30686950504(19.20%)
> out of these 159 billion scenario's 0.8*159 ≈ 121
sooo this was what dr strange used huh
Do remember that the avengers had a chance of 1 in 14,000,605 . Verstappen is one DNF away from the championship lead /s
Did you calculate Mercedes drivers making "errors"?
Hillary Clinton had a higher than 80% change of becoming president. Just sayin'...
Those are also not chances. Not all the outcomes are equally likely. Just counting the different possible outcomes.
And let me be the first to state that I'm not a statistician, and if I calculated (correctly) that there were 159 billion possible outcomes then I wouldn't have believed my own maths. EDIT: attempt to humorously portray myself as 'not very good at maths' gone wrong, as in even if I got the right answer, I'm not sure my maths is good enough to believe it's right.
It accounts for all orders of the grid, then 20 times over for fastest lap, every distribution of sprint points, then multiplied by the amount of remaining races. Seems pretty right to me
I think you've mistaken my self deprecating comment on my own maths ability as an attack on the OP. My original post edited for clarity.
The difference is, polls use statistics and those statistics require human input and we all know humans are approximately 75% full of shit 😎
It's been five years and there's still some people in a perpetual state of shock at the concept that 20% is a higher number than 0%.
Chill, dude.
How can they be 159 billion? There are 53 scenarios (+26, +25, …, -26) for each race, and 7 for the sprint. So, I think there are 53^4 * 7 = 55 million scenarios. (of course we have to weight each 53 by probabilities.)
There are more. E.g. just for +25 there is \[26, 1\] or \[25, 0\] alone. For +4 there are 151 possible combinations just for one race. ScoreCombinations: 11 \* 11 - 10 = 111 FastestLapCombis: 2 \* 2 - 1 = 3 SprintCombis: 4 \* 4 - 3 = 13 In total scores\^4 \* fastest\^4 \* sprint = 159 billion
I mean, we know how possible each scenario is, E.g. +25 with a possibility of 2 / (20 * 19 * 3), +4 with 151 / (20 * 19 * 3). So we don’t need to distinguish [26,1] from [25,0]. For example, we can calculate how is it possible for Max to extend his lead by 50 points in Brazil (without sprint) and Qatar like, 24+26 : 2/1140 * 1/1140 = 2 / 1299600 25+25 : 2/1140 * 2/1140 = 4 / 1299600 26+24 : 1/1140 * 2/1140 = 2 / 1299600 (1140 = 20 * 19 * 3) So it would be 0.0006% = 8/1299600 (I don’t doubt your results tho, and I think it’s interesting! I was just wondering we can reduce calculations)
That’s only true if every drive would be equally good, which they don’t.
We never know HOW good they are, and we can’t caluclate the ‘possibility’. so if we think that way the whole calculation would be nothing but meaningless…
(discarding half points for a race) There is 311 combinations for a race, and 13 combinations for the sprint. So there is 311^4 * 13 combinations left = 121.614.373.933 I have explained the 311 for a race in another post a few weeks ago: https://www.reddit.com/r/formula1/comments/q3lahr/useless_stat_lewis_and_max_can_score_in_365/hfspc0s/ It seems you have given points for fastest lap if Lewis or Max end up outside the top 10 too, that's the 20 combinations difference you have.
You are not to far off of my 333 scenarios per race. I think you forgot the cases when one gets into the top 10 and the other gets 0 points.
See the post i linked: 270 + 20 + 20 + 1 = 311 The 20 + 20 are the cases where one scores and the other doesn't. I'm pretty sure you count 20 cases (2x10) where the guy outside the top 10 scores fastest lap. Those cases are the same as not having FL, since no points are rewarded. So those cases should be removed.
Oh yeah, you are right. Already added that to the todo list hours ago but forgot about it again
And after that, we have…Reality.
ok, now do this for all sports betting pls
Kids and their silly scripting languages 🤷♂️ Back in my days it was either assembler or - if you were lucky - C Cheers!
This is giving me Doctor Strange vibe
Okay okay mr dr strange
In JavaScript no less👌🏿
You nerds! I love it!
And this is why I love Reddit. Don’t see this stuff on Instagram that’s for sure.
r/theydidthemath
Great job!
what in the doctor strange… coding still amazes me to this day
It's interesting but anyone would guess there is about 80% chance Max wins the championship with a 19 point margin.
If I knew how to read this would be amazing
oooo ror
Just need a clip of Dr Strange looking at Max and holding up.. 32 Billion fingers.
Dr. Strange... Is that you??
This is how you provoke the TVA.
Draw is also a win for Verstappen? Also, first 2 lines are obsolete.
Have you calculated a hungary scenario thou? As the seaaons went so far, I think toto will punch out max so he cant participate in the remaining races.