batchMeans

Takes an array of length, n, and computes k batch means where each batch mean is the average of batchSize (b) elements such that b = Math.FloorDiv(n, k). If the number of batches, k, does not divide evenly into n, then n - (k*b) observations are not processed at the end of the array.

The batch means are contained in the returned array.

Return

an array of the batch means

Parameters

numBatches

the number of batches (k), must be less than or equal to n and greater than 0