title: Algorithm to find average of group of numbers
body: <p>I have a quite small list of numbers (a few hundred max) like for example this one:</p>
  
  <blockquote>
    <p>117 99 91 93 95 95 91 97 89 99 89 99
    91 95 89 99 89 99 89 95 95 95 89 948
    189 99 89 189 189 95 186 95 93 189 95
    189 89 193 189 93 91 193 89 193 185 95
    89 194 185 99 89 189 95 189 189 95 89
    189 189 95 189 95 89 193 101 180 189
    95 89 195 185 95 89 193 89 193 185 99
    185 95 189 95 89 193 91 190 94 190 185
    99 89 189 95 189 189 95 185 95 185 99
    89 189 95 189 186 99 89 189 191 95 185
    99 89 189 189 96 89 193 189 95 185 95
    89 193 95 189 185 95 93 189 189 95 186
    97 185 95 189 95 185 99 185 95 185 99
    185 95 190 95 185 95 95 189 185 95 189
    2451</p>
  </blockquote>
  
  <p>If you create a graph with X=the number and Y=number of times we see the number, we'll have something like this:
  <img src="https://i.stack.imgur.com/ODtFu.jpg" alt="Distribution"></p>
  
  <p>What I want is to know the average number of each group of numbers. In the example, there's 4 groups and the resulting numbers are <em>92, 187, 948 and 2451</em></p>
  
  <p>The number of groups of number is not known.</p>
  
  <p>Do you have any idea of how to create a (simple if possible) algorithm do extract these resulting numbers (if possible in c or pseudo code or English :)</p>