I posted some array routines for calculating the sum, the average and the variance of the numbers in an array.

The routine for calculating the variance of the numbers in an array used standard "For‥Next" loops. It is possible to re-write that routine to just use Array operations. For example to calculate the deviations from the mean one could write:

C() = testArray() - Mean

And to calculate the squared deviations one could write:

D() = C() * C()

I wondered about the relative speed of the array operations compared with For ‥ Next loops and also about memory usage. If one has fairly large data sets array operations could perhaps consume a great deal of memory?

Lance

The routine for calculating the variance of the numbers in an array used standard "For‥Next" loops. It is possible to re-write that routine to just use Array operations. For example to calculate the deviations from the mean one could write:

C() = testArray() - Mean

And to calculate the squared deviations one could write:

D() = C() * C()

I wondered about the relative speed of the array operations compared with For ‥ Next loops and also about memory usage. If one has fairly large data sets array operations could perhaps consume a great deal of memory?

Lance