private float CalcStdMax(List <int> distances) { var newDists = CreateBiasedDistances(distances); double avg = MathHelperModule.CalcAvg(newDists); double diffs = 0; newDists.ForEach(i => diffs += Math.Pow((i - avg), 2)); double div = diffs / avg; float res = (float)Math.Sqrt(div); return(res); }