Recent

Author Topic: Average interval among a series of numbers  (Read 5207 times)

typo

  • Hero Member
  • *****
  • Posts: 3051
Average interval among a series of numbers
« on: February 22, 2010, 06:51:17 pm »
Anyone knows any formula to obtain average interval among a series of numbers? Statistical, mathematical, etc? Interval between the first number and second, second and third, etc, until the end of the series?

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: Average interval among a series of numbers
« Reply #1 on: February 22, 2010, 07:01:03 pm »
- iterate from first to second-to-the-last number to calculate absolute values of intervals;
- calculate mean of intervals.

if you don't care about absolute (>= 0) values for the intervals then its simpler:

((a[2] - a[1]) + (a[3] - a[2]) + ... + (a[n] - a[n-1])) / (n - 1) = (a[n] - a[1]) / (n - 1)

« Last Edit: February 24, 2010, 12:27:39 am by Troodon »
Lazarus/FPC on Linux

 

TinyPortal © 2005-2018