Calculate standard deviation.

Namespace:  AForge.Math
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public static double StdDev(
	int[] values,
	double mean
)

Parameters

values
Type: array< System..::.Int32 >[]()[]
Histogram array.
mean
Type: System..::.Double
Mean value of the histogram.

Return Value

Returns value of standard deviation.

Remarks

The input array is treated as histogram, i.e. its indexes are treated as values of stochastic function, but array values are treated as "probabilities" (total amount of hits).

The method is an equevalent to the StdDev(array<Int32>[]()[]) method, but it relieas on the passed mean value, which is previously calculated using Mean(array<Int32>[]()[]) method.

See Also