Forum Discussion

Todd Benedict's avatar
Todd Benedict
Copper Contributor
Nov 03, 2018

Find the closest 3 averages in a range of 21 values

I'm trying to determine the fairest 3 man teams for next season's league by averaging the performance numbers of 21 players and seeing which 3 numbers are most equal, creating the fairest teams. The best player has a final score of 355 while the lowest is 8.9. How do i find the closest 3 numbers to the average of all scores to determine these teams? 

5 Replies

  • Lorenzo Kim's avatar
    Lorenzo Kim
    Bronze Contributor
    wouldn't sorting them in descending (largest to smallest) order give you the top 3 in the list?
    • Todd Benedict's avatar
      Todd Benedict
      Copper Contributor

      Thanks for the response. The average for the below scores per player is 86.2, or for a 3 man team the average is 258.6. What I'd like to do is find the 3 matches that come closest to this average to determine the fairest teams for next year. For example, the best player would have to be paired with the two worst players with the scores

       

      355.87

      15.34

      8.9

       

      I would like to find all other 3 player score combinations that come closest to the average to find the fairest teams

       

      Here are the scores without decimals in descending order. Does this make sense?

       

      356
      236
      212
      170
      142
      109
      103
      94
      57
      40
      40
      34
      33
      33
      32
      30
      26
      23
      16
      15
      9

Resources