calculating mean when the constant doesn't go up by 1

Your Gauss-style approach requires you to know how many columns you've added. It seems to me that your approach would require you to write out the entire list of observations (in order to count the number of entries). There is a different method -- one that does not require writing out the list of pulse-lengths.

The list of numbers {0.150, 0.175, 0.200, … 1.125} is called an "arithmetic sequence" because all adjacent entries differ by the same amount.

That is, we obtain the second entry in the sequence by adding the constant difference to the first entry. We obtain the third entry in the sequence by adding twice the constant difference to the first term. If we want to calculate the 21st entry in the sequence, we would add 20 times the difference to the first term, et cetera.

Formulas exist for (1) determining any number in an arithmetic sequence -- based on its position, (2) calculating the sum of the first N numbers in the sequence, and (3) calculating the total number of entries in the sequence.

Once you know the sum of all the pulse-lengths, as well as the number of pulses observed, you can determine the average pulse-length by division, yes?

Using Google, you may find lessons and examples about arithmetic sequences, like this one. Take a look; see whether you can determine the sum of all of the pulse lengths AND the number of observations, by using the formulas.

Of course, please post specific questions that arise during your studies. Cheers :cool:
 
Last edited:
Top