Click or drag to resize

UnivariateCorrectedStandardDeviation Method

Computes the Bessel-corrected standard deviation.

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
public static double CorrectedStandardDeviation(
	this IReadOnlyCollection<double> sample


Type: System.Collections.GenericIReadOnlyCollectionDouble
The sample.

Return Value

Type: Double
The Bessel-corrected standard deviation.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IReadOnlyCollectionDouble. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
ArgumentNullExceptionsample is .

This probably isn't the quantity you want, even though it's what many software packages refer to as the "standard deviation", and some authors even misleadingly call the "sample standard deviation". It is the square root of the sum of the squared deviations from the mean, divided by n-1 instead of n.

Using n-1 instead of n in the formula for variance produces an unbiased estimator of the PopulationVariance(IReadOnlyCollectionDouble). But using n-1 instead of n in the formula for standard deviation, which is how this property is computed, does not produce an unbiased estimator of the population's standard deviation. Our implementation of PopulationStandardDeviation(IReadOnlyCollectionDouble) does a better job of reducing bias, so you should use it instead if that is what you are trying to estimate. The main reason this property exists at all is to satisfy users who want to compute the exact same value that another software package did.

See Also