title: Formula to calculate average number on expanding data array
body: <p>Say, if I had a final array of numbers, say:</p>
  
  <pre><code>{1, 5, 7, 2}
  </code></pre>
  
  <p>the average for them will be:</p>
  
  <pre><code>(1 + 5 + 7 + 2) / 4;   //Or, sum of all elements, divided by their number
  </code></pre>
  
  <p>But what if my array is constantly growing and I need to know the current average number at an instance of time when the full array is not known yet. How do you calculate that?</p>
  
  <p>Say, like when I'm trying to display current data transfer rate.</p>