Click or drag to resize

UnivariateStandardDeviation Method

Computes the sample standard deviation.

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

Parameters

sample
Type: System.Collections.GenericIReadOnlyCollectionDouble
The sample.

Return Value

Type: Double
The standard deviation of the sample data.

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).
Exceptions
ExceptionCondition
ArgumentNullExceptionsample is .
Remarks

Note that a few authors use the term "sample standard deviation" to mean "the square root of the population variance as estimated by the sample". We do not adopt this aberrant convention, which is contrary to the conventional meaning of "sample moment" for all other moments. In other words, what is returned by this methods is the square root of the sum of the squared deviations divided by n, not divided by (n-1). If you want the square root of the sum of the squared deviations divided by n, which is also called the Bessel-corrected standard deviation, use the CorrectedStandardDeviation(IReadOnlyCollectionDouble) method. Note, however, that, unlike the variance, the standard deviation corrected in this way is not unbiased. If you want a bias-corrected estimate of the standard deviation of the populace that was sampled, use the PopulationStandardDeviation(IReadOnlyCollectionDouble) method.

See Also