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);
    }