Computes the sample variance over an array of values.