private function standardDeviation(array $results)
    {
        $mean = array_sum($results) / count($results);
        $initial = 0;
        $f = function ($carry, $val) use ($mean) {
            return $carry + pow($val - $mean, 2);
        };
        $sum = array_reduce($results, $f, $initial);
        $n = count($results) - 1;

        return $n === 0 ? 0 : sqrt($sum / $n);
    }
private function standardDeviation(array $results)
    {
        $mean = array_sum($results) / count($results);
        $initial = 0;
        $f = function ($carry, $val) use ($mean) {
            return $carry + pow($val - $mean, 2);
        };
        $sum = array_reduce($results, $f, $initial);
        $n = count($results) - 1;

        return $n === 0 ? 0 : sqrt($sum / $n);
    }
private function standardDeviation ( array $ results ) { $ mean = array_sum ( $ results ) / count ( $ results ) ; $ initial = 0 ; $ f = function ( $ carry , $ val ) use ( $ mean ) { return $ carry + pow ( $ val - $ mean , 2 ) ; } ; $ sum = array_reduce ( $ results , $ f , $ initial ) ; $ n = count ( $ results ) - 1 ; return $ n === 0 ? 0 : sqrt ( $ sum / $ n ) ; }
Returns one standard deviation for the given results

@param array $results

@return float
Returns one standard deviation for the given results