Skip to content

Instantly share code, notes, and snippets.

@rdoursenaud
Created June 25, 2023 23:22
Show Gist options
  • Save rdoursenaud/a5e9fe6084619c272bc2310d87e06e11 to your computer and use it in GitHub Desktop.
Save rdoursenaud/a5e9fe6084619c272bc2310d87e06e11 to your computer and use it in GitHub Desktop.

Statistics of Trackmania's Cup Of The Day (COTD)

Or the odds of two players facing together in a COTD finale!

Inspiration

https://www.youtube.com/watch?v=nAIDNr4__kY

References & Sources

Life

Likelyhood that the two plays the same day?

For simplicity we'll postulate 100% even though it is not realistic. This should be adjusted for more accurate results.

P(BothSameDay) = 1

100%

Qualifier

Likelyhood that they both qualify into division 1?

Independant

Each player individually.

P(Div1) = 64 ÷ number_of_players

P(Div1) = 64 ÷ 3 551

P(Div1) ≃ 0,018

1,8 %

Dependant

Both players together.

P(BothDiv1Generic) = P(Div1Generic) × P(Div1Generic)
P(BothDiv1Generic) = P(Div1Generic)²

P(BothDiv1) = 0,018 × 0,018
P(BothDiv1) = 0,018²

P(BothDiv1) ≃ 0,000324

0,03 %

Now one could and should ponderate this with each player's level. A higher level player has a better likelyhood to win than a novice. But we're gonna ignore that here ;) This also applies to the rounds!

Rounds (Independant)

Likelyhood of each player's survival per rounds.

P(Survival[1-24]) = number_of_survivable_spots ÷ number_of_remaining_players
P(Survival[1-24]) = (number_of_remaining_players - number_of_ko_this_round) ÷ number_of_remaining_players

Round 1

No KO.

P(Survival1) = 64 ÷ 64
P(Survival1) = 1

Round 1: 100 %

Rounds 2 to 13

4 KOs per round.

P(Survival2) = (64 - 4) ÷ 64
P(Survival2) = 60 ÷ 64
P(Survival2) = 15 ÷ 16

P(Survival2) ≃ 0,9375

Round 2: 93,75 %

P(Survival3) = (60 - 4) ÷ 60
P(Survival3) = 56 ÷ 60
P(Survival3) = 14 ÷ 15

P(Survival3) ≃ 0,9333

Round 3: 93,33 %

P(Survival4) = (56 - 4) ÷ 56
P(Survival4) = 52 ÷ 56
P(Survival4) = 13 ÷ 14

P(Survival4) ≃ 0,9286

Round 4: 92,86 %

P(Survival5) = (52 - 4) ÷ 52
P(Survival5) = 48 ÷ 52
P(Survival5) = 12 ÷ 13

P(Survival5) ≃ 0,9231

Round 5: 92,31 %

P(Survival6) = (48 - 4) ÷ 48
P(Survival6) = 44 ÷ 48
P(Survival6) = 11 ÷ 12

P(Survival6) ≃ 0,9167

Round 6: 91,67 %

P(Survival7) = (44 - 4) ÷ 44
P(Survival7) = 40 ÷ 44
P(Survival7) = 10 ÷ 11

P(Survival7) ≃ 0,9091

Round 7: 90,91 %

P(Survival8) = (40 - 4) ÷ 40
P(Survival8) = 36 ÷ 40
P(Survival9) = 9 ÷ 10
P(Survival8) = 0,9

Round 8: 90 %

P(Survival9) = (36 - 4) ÷ 36
P(Survival9) = 32 ÷ 36
P(Survival9) = 8 ÷ 9

P(Survival9) ≃ 0,8889

Round 9: 88,89 %

P(Survival10) = (32 - 4) ÷ 32
P(Survival10) = 28 ÷ 32
P(Survival10) = 7 ÷ 8
P(Survival10) = 0,875

Round 10: 87,5 %

P(Survival11) = (28 - 4) ÷ 28
P(Survival11) = 24 ÷ 28
P(Survival11) = 6 ÷ 7

P(Survival11) ≃ 0,8571

Round 11: 85,71 %

P(Survival12) = (24 - 4) ÷ 24
P(Survival12) = 20 ÷ 24
P(Survival12) = 5 ÷ 6

P(Survival12) ≃ 0,8333

Round 12: 83,33 %

P(Survival13) = (20 - 4) ÷ 20
P(Survival13) = 16 ÷ 20
P(Survival13) = 4 ÷ 5
P(Survival13) = 0,8

Round 13: 80 %

Rounds 14 to 17

2 KOs per round.

P(Survival14) = (16 - 2) ÷ 16
P(Survival14) = 14 ÷ 16
P(Survival14) = 7 ÷ 8
P(Survival14) = 0,875

Round 14: 87,5 %

P(Survival15) = (14 - 2) ÷ 14
P(Survival15) = 12 ÷ 14
P(Survival15) = 6 ÷ 7

P(Survival15) ≃ 0,8571

Round 15: 85,71 %

P(Survival16) = (12 - 2) ÷ 12
P(Survival16) = 10 ÷ 12
P(Survival16) = 5 ÷ 6

P(Survival16) ≃ 0,8333

Round 16: 83,33 %

P(Survival17) = (10 - 2) ÷ 10
P(Survival17) = 8 ÷ 10
P(Survival17) = 4 ÷ 5
P(Survival17) = 0,8

Round 17: 80 %

Rounds 18 to 24

1 KO per round.

P(Survival18) = (8 - 1) ÷ 8
P(Survival18) = 7 ÷ 8
P(Survival18) = 0,875

Round 18: 87,5 %

P(Survival19) = (7 - 1) ÷ 7
P(Survival19) = 6 ÷ 7

P(Survival19) ≃ 0,8571

Round 19: 85,71 %

P(Survival20) = (6 - 1) ÷ 6
P(Survival20) = 5 ÷ 6

P(Survival20) ≃ 0,8333

Round 20: 83,33 %

P(Survival21) = (5 - 1) ÷ 5
P(Survival21) = 4 ÷ 5
P(Survival21) = 0,8

Round 21: 80 %

P(Survival22) = (4 - 1) ÷ 4
P(Survival22) = 3 ÷ 4
P(Survival22) = 0,75

Round 22: 75 %

P(Survival23) = (3 - 1) ÷ 3
P(Survival23) = 2 ÷ 3

P(Survival23) ≃ 0,6667

Round 23: 66,67 %

P(Survival24) = (2 - 1) ÷ 2
P(Survival24) = 1 ÷ 2
P(Survival24) = 0,5

Round 24: 50 %

Combined

Chances of going to finale COTD once qualified.

P(SurvivalToFinale) =   P(Survival1)
                      × P(Survival2)
                      × P(Survival3)
                      ...
                      × P(Survival23)

P(SurvivalToFinale) =   1
                      × 15 ÷ 16
                      × 14 ÷ 15
                      × 13 ÷ 14
                      × 12 ÷ 13
                      × 11 ÷ 12
                      × 10 ÷ 11
                      × 9 ÷ 10
                      × 8 ÷ 9
                      × 7 ÷ 8
                      × 6 ÷ 7
                      × 5 ÷ 6
                      × 4 ÷ 5
                      × 7 ÷ 8
                      × 6 ÷ 7
                      × 5 ÷ 6
                      × 4 ÷ 5
                      × 7 ÷ 8
                      × 6 ÷ 7
                      × 5 ÷ 6
                      × 4 ÷ 5
                      × 3 ÷ 4
                      × 2 ÷ 3
                      × 1 ÷ 2
P(SurvivalToFinale) =   4 ÷ 16
                      × 4 ÷ 8
                      × 1 ÷ 8
P(SurvivalToFinale) = 1 ÷ 64
P(SurvivalToFinale) ≃ 0,01563

1,56 %

Chances of winning including qualifier.

P(WinCOTD) = P(Div1) × P(SurvivalToFinale) × P(Survival24)

P(WinCOTD) =   64 ÷ 3 551
             × 1 ÷ 64
             × 1 ÷ 2
P(WinCOTD) =   1 ÷ 3 551 
             × 1 ÷ 2
P(WinCOTD) = 1 ÷ 7 102

P(WinCOTD) = 0,0001409

0,014 %

Rounds (Dependant)

Likelyhood that both players survives per rounds.

P(SurvivalBoth[1-23]) = P(Survival[1-23]) × P(Survival[1-23])
P(SurvivalBoth[1-23]) = P(Survival[1-23])²

Round 24 is a trap, hence it's ignored. See below for the explanation.

Round 1

P(SurvivalBoth1) = 1²
P(SurvivalBoth1) = 1

Round 1: 100 %

Rounds 2 to 13

P(SurvivalBoth2) = (60 ÷ 64)²
P(SurvivalBoth2) ≃ 0,8789

Round 2: 87,89 %

P(SurvivalBoth3) = (56 ÷ 60)²
P(SurvivalBoth3) ≃ 0,8711

Round 3: 87,11 %

P(SurvivalBoth4) = (52 ÷ 56)²
P(SurvivalBoth4) ≃ 0,8622

Round 4: 86,22 %

P(SurvivalBoth5) = (48 ÷ 52)²
P(SurvivalBoth5) ≃ 0,8521

Round 5: 85,21 %

P(SurvivalBoth6) = (44 ÷ 48)²
P(SurvivalBoth6) ≃ 0,8403

Round 6: 84,03 %

P(SurvivalBoth7) = (40 ÷ 44)²
P(SurvivalBoth7) ≃ 0,8264

Round 7: 82,64 %

P(SurvivalBoth8) = (36 ÷ 40)²
P(SurvivalBoth8) ≃ 0,81

Round 8: 81 %

P(SurvivalBoth9) = (32 ÷ 36)²
P(SurvivalBoth9) ≃ 0,7901

Round 9: 79,01 %

P(SurvivalBoth10) = (28 ÷ 32)²
P(SurvivalBoth10) ≃ 0,7656

Round 10: 76,56 %

P(SurvivalBoth11) = (24 ÷ 28)²
P(SurvivalBoth11) ≃ 0,7347

Round 11: 73,47 %

P(SurvivalBoth12) = (20 ÷ 24)²
P(SurvivalBoth12) ≃ 0,6944

Round 12: 69,44 %

P(SurvivalBoth13) = (16 ÷ 20)²
P(SurvivalBoth13) = 0,64

Round 13: 64 %

Rounds 14 to 17

P(SurvivalBoth14) = (14 ÷ 16)²
P(SurvivalBoth14) ≃ 0,7656

Round 14: 76,56 %

P(SurvivalBoth15) = (12 ÷ 14)²
P(SurvivalBoth15) ≃ 0,7347

Round 15: 73,47 %

P(SurvivalBoth16) = (10 ÷ 12)²
P(SurvivalBoth16) ≃ 0,6944

Round 16: 69,44 %

P(SurvivalBoth17) = (8 ÷ 10)²
P(SurvivalBoth17) = 0,64

Round 17: 64 %

Rounds 18 to 24

P(SurvivalBoth18) = (7 ÷ 8)²
P(SurvivalBoth18) ≃ 0,7656

Round 18: 76,56 %

P(SurvivalBoth19) = (6 ÷ 7)²
P(SurvivalBoth19) ≃ 0,7347

Round 19: 73,47 %

P(SurvivalBoth20) = (5 ÷ 6)²
P(SurvivalBoth20) ≃ 0,6944

Round 20: 69,44 %

P(SurvivalBoth21) = (4 ÷ 5)²
P(SurvivalBoth21) = 0,64

Round 21: 64 %

P(SurvivalBoth22) = (3 ÷ 4)²
P(SurvivalBoth22) ≃ 0,5625

Round 22: 56,25 %

P(SurvivalBoth23) = (2 ÷ 3)²
P(SurvivalBoth23) ≃ 0,4444

Round 23: 44,44 %

Since only one player can win, there is not a single chance of both winning! It makes no sense to compute this one ;)

P(SurvivalBoth24) = 0

Round 24: 0 %

Combined

Global chances of both player surviving until the finale once qualified.

P(SurvivalBothToFinale) =   P(SurvivalBoth1)
                          × P(SurvivalBoth2)
                          × P(SurvivalBoth3)
                          ...
                          × P(SurvivalBoth23)

P(SurvivalBothToFinale) = 1
                          × (60 ÷ 64)²
                          × (56 ÷ 60)²
                          × (52 ÷ 56)²
                          × (48 ÷ 52)²
                          × (44 ÷ 48)² 
                          × (40 ÷ 44)² 
                          × (36 ÷ 40)² 
                          × (32 ÷ 36)² 
                          × (28 ÷ 32)² 
                          × (24 ÷ 28)² 
                          × (20 ÷ 24)² 
                          × (16 ÷ 20)² 
                          × (14 ÷ 16)² 
                          × (12 ÷ 14)² 
                          × (10 ÷ 12)² 
                          × (8 ÷ 10)² 
                          × (7 ÷ 8)² 
                          × (6 ÷ 7)² 
                          × (5 ÷ 6)² 
                          × (4 ÷ 5)² 
                          × (3 ÷ 4)² 
                          × (2 ÷ 3)²
P(SurvivalBothToFinale) =   60² ÷ 64²
                          × 56² ÷ 60²
                          × 52² ÷ 56²
                          × 48² ÷ 52²
                          × 44² ÷ 48²
                          × 40² ÷ 44²
                          × 36² ÷ 40²
                          × 32² ÷ 36²
                          × 28² ÷ 32²
                          × 24² ÷ 28²
                          × 20² ÷ 24²
                          × 16² ÷ 20²
                          × 14² ÷ 16²
                          × 12² ÷ 14²
                          × 10² ÷ 12²
                          × 8² ÷ 10² 
                          × 7² ÷ 8² 
                          × 6² ÷ 7² 
                          × 5² ÷ 6² 
                          × 4² ÷ 5² 
                          × 3² ÷ 4² 
                          × 2² ÷ 3²
P(SurvivalBothToFinale) = 2² ÷ 64²
P(SurvivalBothToFinale) = 4 ÷ 4 096
P(SurvivalBothToFinale) = 1 ÷ 1 024

P(SurvivalBothToFinale) ≃ 0,001

1 in 1024

About 1 ‰ or 0,1 %

Let's put it together

Chances of being in a COTD cup together.

P(BothFinale) = P(BothSameDay) × P(BothDiv1) × P(SurvivalBothToFinale)
P(BothFinale) =   1
                × (64 ÷ 3 551)²
                × 2² ÷ 64²
P(BothFinale) =   64² ÷ 3 551²
                × 2² ÷ 64²
P(BothFinale) = 2² ÷ 3 551²
P(BothFinale) = 4 ÷ 12 609 601

P(BothFinale) ≃ 1 ÷ 3 152 400
P(BothFinale) ≃ 0,3172 × 10⁻⁶
P(BothFinale) ≃ 0,0000003172

1 in 3 152 400

About 0,00003172 %

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment