public MedianEquivalentValue ( long value ) : long | ||
value | long | The given value |
return | long |
/// <summary> /// Get the computed standard deviation of all recorded values in the histogram /// </summary> /// <returns>the standard deviation (in value units) of the histogram data</returns> public static double GetStdDeviation(this HistogramBase histogram) { var mean = histogram.GetMean(); var geometricDeviationTotal = 0.0; foreach (var iterationValue in histogram.RecordedValues()) { double deviation = (histogram.MedianEquivalentValue(iterationValue.ValueIteratedTo) * 1.0) - mean; geometricDeviationTotal += (deviation * deviation) * iterationValue.CountAddedInThisIterationStep; } var stdDeviation = Math.Sqrt(geometricDeviationTotal / histogram.TotalCount); return(stdDeviation); }