magic number formula/calculator?

Discussion in 'Statistics and Analysis' started by Roehl Sybing, Sep 7, 2008.

  1. Roehl Sybing

    Roehl Sybing Guest

    Is there anything on the Internet where one can determine the points needed for any team to clinch a group, if you enter in the group format (i.e. home and away), points for win and draw, and optionally the results so far?

    Or is there an end-all formula to make the determination by hand?

    I ask this 'cause I can't seem, no matter how hard I try, to pinpoint, for example, how many more points the US needs to qualify for the Hex after two wins.
     
  2. ENB Sports

    ENB Sports Member

    Feb 5, 2007
    Not sure about a program but you can kind of do it in your head.

    But in 4 team 6 game round robin set-up 4W-1D-1L record will automaticaly get you a top 2 place. During champions league they always say 12pts will get you in which is 4-0-2 or 3-3-0 although realisticaly you could have a 3 way tie for first if the last place team goes 0-0-6.

    In terms of a formula its much more difficult in soccer then a baseball magic number because of the draws and three point wins.

    BTW the baseball magic number is

    The magic number is calculated as G + 1 − WALB, where
    • G is the total number of games in the season
    • WA is the number of wins that team A has in the season
    • LB is the number of losses that team B has in the season
    Although I assume you could develop one that would give you the same type of result for soccer although the answer will probably be the maximum amount points left in the season - the difference between your team and team your comparing yourself too.
     
  3. EvanJ

    EvanJ Member+

    Manchester United
    United States
    Mar 30, 2004
    Club:
    Manchester United FC
    Nat'l Team:
    United States
    I don't know how many points the United States needs to advance, but we should certain clinch on Matchday 4 or 5 in October. Even after Wednesday there will be 729 possible combinations for the remaining 6 games in the group. After Matchday 4 there will be 81 possible combinations at which point maybe somebody would make a spreadsheet listing who advances for each scenario, but hopefully the United States will clinch advancing by then.

    To try to get a magic number, maybe think about what combination of results in the four remaining games not involving the United States (Guatemala against Cuba twice and each of those countries against Trinidad and Tobago once) will result in the highest point total for the second best team out of those three. There are 81 possible combinations for those four games.
     
  4. EvanJ

    EvanJ Member+

    Manchester United
    United States
    Mar 30, 2004
    Club:
    Manchester United FC
    Nat'l Team:
    United States
    Assuming the United States beats Trinidad and Tobago and Guatemala beats Cuba on Matchday 3, there are 27 scenarios for the three games after Matchday 3 not involving the United States. Here is how many points the second best team other than the United States would have in each of those scenarios (assuming the top two of the other three teams beat the United States in Matchday 4, 5, or 6):

    11 (frequency 1)
    10 (frequency 6)
    9 (frequency 5)
    8 (frequency 11)
    7 (frequency 4)

    So if the United States beats Trinidad and Tobago on Wednesday, we can clinch qualification with a home win over Cuba on Matchday 4.

    The next question is if the United States can clinch qualification with a win and a draw and 10 points after Matchday 4. If the United States wins on Matchday 3, Guatemala and Cuba draw on Matchday 3, the United States draws on Matchday 4, and Guatemala doesn't beat Trinidad and Tobago on Matchday 4, the United States clinches qualification. If the United States and Cuba win on Matchday 3 and those two countries draw on Matchday 4, the other Matchday 4 game and the Matchdays 5 and 6 games could hypothetically result in a three way tie for first.
     
  5. NoSix

    NoSix Member+

    Feb 18, 2002
    Phoenix
    It is more of an algorithm than a formula, but you can determine the number of points required as follows:

    To clinch qualification, a team needs (1+number of points available in remaining matches) greater than the third place team with the highest possible number of points after the next round.

    For group 1, USA has 9 pts, GUA and TRI have 4 pts and play each other in the next round. After the next round, the highest possible number of points for a third place team is 5 pts (if the GUA-TRI match ends in a draw, otherwise the third place team would only have 4 pts). So to clinch the USA needs 5+7=12 pts (best third place team total + 1 more than 6 possible points from two remaining matches after the 4th round), or 3 more points in addition to the 9 they already have.

    For group 2, the highest possible third place point total after the next round is 4 pts, so to clinch MEX needs 4+7=11 pts, or two more in addition to the 9 they already have.

    For group 3, the highest possible third place point total after the next round is also 4 pts, so to clinch CRC also needs 4+7=11 pts, or two more in addition to the 9 they already have.
     
  6. Roehl Sybing

    Roehl Sybing Guest

    Everyone's been partially helpful, thanks.

    I did want to think about the process more generally, however. At the start of a group phase before any games, what would be the number of points required to guarantee earning a winning spot? Seven points in a World Cup group, for example, clinches a second round spot, but how can that be determined? What about the minimum number of points to qualify out of the CONCACAF Hex? Or out of CONMEBOL? Is there an algorithm (as NoSix has corrected me on) that can be applied universally?

    Of course, as games take place, that number may go down, but from what number?
     
  7. NoSix

    NoSix Member+

    Feb 18, 2002
    Phoenix
    The algorithm I suggested is generally valid. The minimum number of points required to guarantee advancement is 1 more than the best possible finish for a team not qualifying (3rd place if the top two teams qualify).

    For example, with 4 team groups playing each other home and way (current round of CONCACAF qualifying), the highest possible point total for a third place finish is 12 pts (12-12-12-0), therefore 13 pts is required to clinch advancement.

    For a WC group with 4 teams who play each other only once, the highest possible point total for a third place finish is 6 pts (6-6-6-0), so 7 pts is required to clinch advancement.
     
  8. NoSix

    NoSix Member+

    Feb 18, 2002
    Phoenix
    For the CONCACAF hex, the highest possible 5th place finish is 18 points (18-18-18-18-18-0), so 19 points is required to clinch at least 4th.

    For CONMEBOL qualifying, the highest possible 6th place finish is 45 points (45-45-45-45-45-45-0-0-0-0), so 46 points is required to clinch at least 5th.
     
  9. NoSix

    NoSix Member+

    Feb 18, 2002
    Phoenix
    Also, for the CONCACAF hex, the highest possible 4th place finish is 22 pts (22-22-22-22-0-0), so 23 pts is required in order to clinch at least 3rd place (automatic qualification).
     
  10. NoSix

    NoSix Member+

    Feb 18, 2002
    Phoenix
    Correction: for CONMEBOL qualifying the best possible 6th place finish is 39 points (39-39-39-39-39-39-18-12-6-0), so 40 points clinches at least a 5th place finish.

    Correction: for CONCACAF hex the best possible 4th place finish is 21 points (21-21-21-21-6-0), so 22 points clinches at least a 3rd place finish (automatic qualification).

    Finally, for CONMEBOL qualifying, the best possible 5th place finish is 42 pts (42-42-42-42-42-24-18-12-6-0), so 43 points clinches at least a 4th place finish (automatic qualification).
     
  11. EvanJ

    EvanJ Member+

    Manchester United
    United States
    Mar 30, 2004
    Club:
    Manchester United FC
    Nat'l Team:
    United States
    For a double round-robin group of 4 teams (6 games each) or 6 teams (10 games each), what possible standings positions could you have for each point total? I'll start with some obvious ones:

    Group of 4:
    0: 4th
    1: 3rd or 4th
    2: 3rd or 4th
    3: 3rd or 4th
    4: 2nd, 3rd, or 4th (if the bottom three teams all lost both games to the top team and played all draws with each other, this would happen and either goal differential or goals scored would have to break the tiebreaker since head-to-head among the bottom three teams couldn't break the tie)
    5:
    6:
    7:
    8:
    9:
    10:
    11:
    12:
    13:
    14:
    15: 1st or 2nd
    16: 1st or 2nd
    17: Impossible to get
    18: 1st

    Can somebody fill in the middle values and also the values for a group of six where the point possibilities for each team are all the numbers from 0 to 30 except 29?
     
  12. NoSix

    NoSix Member+

    Feb 18, 2002
    Phoenix
    Getting back to the original question, given a round-robin group (each team plays each other team home and away) where m teams advance and n teams do not, the required number of points to clinch advancement is given by:

    {[(m+n)*(m+n-1)-(n-1)*(n-2)]*3/(m+1)}+1

    For example, in CONMEBOL to at least qualify for the play-off, m=5, n=5, and the formula becomes:

    {[(10)*(9)-(4)*(3)]*3/(6)}+1={[90-12]*3/6}+1=39+1=40

    In CONMEBOL to clinch automatic qualification, m=4, n=6, and the formula becomes:

    {[(10)*(9)-(5)*(4)]*3/(5)}+1={[90-20]*3/5}+1=42+1=43

    In the current CONCACAF round, m=2, n=2, and the formula becomes:

    {[(4)*(3)-(1)*(0)]*3/(3)}+1={12*3/3}+1=13

    Just for fun you could put in m=4 and n=16 to discover that 103 pts in the EPL guarantees qualification for the Champion's League, or m=17 and n=3 to discover that it takes a whopping 64 pts to clinch safety from relegation!
     
  13. NoSix

    NoSix Member+

    Feb 18, 2002
    Phoenix
    The following table summarizes the number of points required to clinch qualification in the final round of World Cup qualifying in each region. If a continent has two rows, the first shows the number of points required to clinch automatic qualification to the World Cup finals, and the second shows the number of points to qualify for play-off(s) to make the World Cup finals.

    Code:
    Region	m	n	clinch	avail	pct
    Africa	1	3	16	18	89%
    Asia	2	3	19	24	79%
    Asia	3	2	16	24	67%
    Europe	1	5	28	30	93%
    Europe	2	4	25	30	83%
    N Am	3	3	22	30	73%
    N Am	4	2	19	30	63%
    Oceana	1	3	16	18	89%
    S Am	4	6	43	54	80%
    S Am	5	5	40	54	74%
    
    
    m is the number of teams advancing from a group, n is the number of teams not advancing from a group, clinch is the number of points required to clinch advancement, avail is the number of points available to be won by each team, and pct is the ratio of the points needed to clinch to the points available.
     
  14. angrywhiteman

    angrywhiteman Member

    May 26, 2004
    CO Mountains
    Club:
    Colorado Rapids
    Nat'l Team:
    United States
    I'm curious as to how you derived the above formula for determining minimum number of points to assure passage out of a group. I can see that it works, I'm just trying to explore the reasoning behind it.

    Correct me if I'm wrong, and I'm no math guy, but is (m+n)(m+n-1) the total number of matches played within a double round robin group? Is (n-1)(n-2) then the number of matches between (n-1) teams? Thus the total within the brackets [] would be the number of games involving qualifying teams AND the first team to miss out, right? Am I then correct to say multiplying by 3 yields the maximum number of points from among these matches, and that dividing by (m+1) distributes these maximum points equally?

    In my estimation this would yield all (m+1) teams tied atop the group, and thus the (m+1)th team has the maximum number of points possible to miss out on qualification, and 1 plus that total would be the minimum to mathematically guarantee qualification.

    Is this how you did it, or am I very confused?
     
  15. NoSix

    NoSix Member+

    Feb 18, 2002
    Phoenix
    Nope, you have nailed it - well done. That's why I left the formula in its current form - easy to understand. You can simplify the expression to its shortest form, but then the formula seems to come out of thin air.
     
  16. Gibraldo

    Gibraldo Member+

    radnicki nis
    Serbia
    Nov 17, 2005
    Club:
    FK Crvena Zvezda Beograd
    Ok, i have the same issue concerning a football manager, that i am about to program. It deals with national teams and qualifieres and finals and so on.

    To me, it is not so much of interest what can be in the beginning of the matches but more within the group phase itself, as i want to highlight, when a country has qualified for a final tournament even early in the campaign, as they cannot lose a place that secures them a berth.

    In fact, before a matchday, i want to recalculate, which teams might secure qualification with a certain result or on the opposite will fail. How, for example can I estimate, that with another loss, San Marino won`t be able to clich a top spot in their group and reach South Africa (or at least a play off berth).

    To achieve this, i need to consider also the other matches of the group, as teams will share points which will limiting the chances of San Marino again.

    Can someone name me on which matchday San Marino will fail to qualify for sure? Of course in a formula :)
     
  17. NoSix

    NoSix Member+

    Feb 18, 2002
    Phoenix
    Before any matches are played, the formula is quite simple: 2*(n+m-1)-1. Since the lowest possible qualifying point total is 2*(n+m-1) points when all matches are drawn, once San Marino reaches the point where their maximum possible point total is one less than the total number of matches they will play, they are mathematically eliminated.
     
  18. EvanJ

    EvanJ Member+

    Manchester United
    United States
    Mar 30, 2004
    Club:
    Manchester United FC
    Nat'l Team:
    United States
    The 2011-2012 CONCACAF Champions League made me search for this topic. In Group A, the top three clubs had 12 points each while fourth place lost all six games. http://en.wikipedia.org/wiki/2011–12_CONCACAF_Champions_League_Group_Stage#Group_A has the results. Head-to-head was the tiebreaker and it went to head-to-head goal differential because head-to-head record was even. As it turned out, the top two would have swapped if overall goal differential was the tiebreaker but third would have remained the same.

    On another note, CONMEBOL now has 4.5 spots available in qualifying with 9 teams participating because Brazil is hosting World Cup 2014. If I'm using the formula in Post 12 of this topic correctly, 37 points guarantee automatic qualification and 34 points guarantees at least a spot in the interconfederational playoff. Comparing this to last cycle with one more team playing, the two point totals are 6 points fewer each and the amount of points the country can afford to drop remains the same (a loss drops 3 points and a draw drops 2 points). In terms of what percent of the maximum points are necessary to clinch fourth or better and to clinch fifth or better, it is easier to qualify from CONMEBOL this time which makes sense considering a greater percentage of the teams qualify (4/9 vs. 4/10) and a greater percentage of the teams go into the interconfederational playoff (1/9 vs. 1/10).

    It could be interesting to look at how often the worst team that advances/qualifies (depending on the part of the competition the group was in) had enough points to guarantee that position.

    Is there a way of modifying the formula in Post 12 to calculate that if a team has X points or fewer they are guaranteed not to advance?
     
  19. EvanJ

    EvanJ Member+

    Manchester United
    United States
    Mar 30, 2004
    Club:
    Manchester United FC
    Nat'l Team:
    United States
    This cycle the CONMEBOL WCQs have 9 teams participating rather than 10. 34 points guarantees a CONMEBOL the interconfederational playoff and 37 points guarantees qualification.

    Given the number of teams and games played per team and that the schedule is balanced, is there a way of calculating how many possible point distributions there are? It would be a giant number for something like a Premier League or La Liga season, but would the number be manageable for a double round-robin group of 4?

    Edit: With a double round-robin group of 4, both 6 points and 9 points are amounts that could go to a first, second, third, or fourth place team. Every team could have 6 points of every game was a draw and every team could have 9 points if every team won 3 games and lost 3 games. 7 and 8 are in between 6 and 9, so is it safe to assume that a team with 7 or 8 points could finish first, second, third, or fourth?

    Edit again: I noticed a mistake I made in Post 11 of this topic. I said that it was possible to finish third with 1 point but that's impossible. A team with 1 point obviously only had 1 game that wasn't a loss, and if the fourth place team has exactly 1 point, the third place team must have at least 4 points (from a win and a draw against the fourth place team).
     
  20. EvanJ

    EvanJ Member+

    Manchester United
    United States
    Mar 30, 2004
    Club:
    Manchester United FC
    Nat'l Team:
    United States
    For a double round-robin group of 4 here are what finishing positions a team could have for every point total:

    0: 4th
    1: 4th
    2: 3rd or 4th
    3: 3rd or 4th
    4: 2nd, 3rd, or 4th (if the bottom three teams all lost both games to the top team and played all draws with each other, this would happen and either goal differential or goals scored would have to break the tiebreaker since head-to-head among the bottom three teams couldn't break the tie)
    5: 2nd, 3rd, 4th
    6: 1st, 2nd, 3rd, or 4th (if every game was a draw)
    7: 1st, 2nd, 3rd, 4th
    8: 1st, 2nd, 3rd, 4th
    9: 1st, 2nd, 3rd, or 4th (if every team won 3 games and lost 3 games)
    10: 1st, 2nd, or 3rd
    11: 1st, 2nd, or 3rd
    12: 1st, 2nd, or 3rd
    13: 1st or 2nd
    14: 1st or 2nd
    15: 1st or 2nd
    16: 1st or 2nd
    17: Impossible to get
    18: 1st
     
  21. Carolie86

    Carolie86 New Member

    Mar 18, 2012
    Everyone's been partially helpful, thanks.
     
  22. SJJ

    SJJ Member

    Sep 20, 1999
    Royal Oak, MI, USA
    Club:
    Michigan Bucks
    Nat'l Team:
    United States
    I have actually thought about a program like this for a while, but written generally for any sport, using any form of standings (conferences, divsions, wild-card teams [soccer equivalent: best second/third-place teams], ...), using any form of point system. Just looking at different sports, the amount of formats are amazing. And if you include tie-breaking formulas, the complexities of the calculations go off the chart.

    Short of a completely-generic program, I had written spreadsheets that perform some of the caluclations (just paste in the current standings from a web site, and all computations are done). I'll mention that these calcucations are done via function calls, instead of macro-writing.

    For example, for the EPL, it computes each team's maximal points, then calculates things like: if four teams can't beat your current point total, you've qualified for the UCL; if you can't beat the 17th team point total, you're relegated, ....

    Another good example is NHL hockey: a regulation win is 2-0 in points; an overtime win is 2-1; a shootout win is also 2-1 but shootout wins are not figured into tie-breakers (so the official NHL standings page has an "ROW" column meaning regulation/overtime wins). They also award top playoff seeds to division winners, with wild-cards in each conference.

    But these don't include "what if" result calculations game-by-game, so in the last month of the season (right about now, for the Euro leagues), I'll start doing some hand-calucations.
     

Share This Page