src/operator/group-by-function.js
function variance (arr) {
    let mean = avg(arr);
    return avg(arr.map(num => (num - mean) ** 2));
}
function variance (arr) {
    let mean = avg(arr);
    return avg(arr.map(num => (num - mean) ** 2));
}
function variance ( arr ) { let mean = avg ( arr ) ; return avg ( arr . map ( num => ( num - mean ) ** 2 ) ) ; }
Calculates the variance of the input array.

@param  {Array.<number>} arr - The input array.
@return {number} Returns the variance of the input array.
Calculates the variance of the input array .