0
Try to use this function
public double CalCulateStdDev(List<double> lst)
{
if (lst == null || lst.Count == 0)
throw new ArgumentException("Collection does not have anything to calculate");
double d = 0;
double average = lst.Average();
d = Math.Sqrt(lst.Select(a => Math.Pow(a - average, 2)).Sum() / lst.Count);
return d;
}
Accepted