Stats.StandardDeviation Method

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

Overload List

StandardDeviation(DateTime[]) Returns the standard deviation of the elements of an array.
StandardDeviation(Vector<DateTime>) Returns the standard deviation of the elements of a numerical variable.
StandardDeviation<T>(Vector<T>) Returns the standard deviation of the elements of a vector.
StandardDeviation<T>(T[], Boolean) Returns the standard deviation of the elements of an array.
StandardDeviation<T>(IEnumerable<T>, Boolean) Returns the standard deviation of the elements of a sequence.

StandardDeviation(DateTime[])

Returns the standard deviation of the elements of an array.
C#
public static TimeSpan StandardDeviation(
	DateTime[] values
)

Parameters

values  DateTime[]
An DateTime array.

Return Value

TimeSpan
The standard deviation of the elements of values.

Remarks

The standard deviation is a TimeSpan value.

Exceptions

ArgumentNullException

values is null.

StandardDeviation(Vector<DateTime>)

Returns the standard deviation of the elements of a numerical variable.
C#
public static TimeSpan StandardDeviation(
	this Vector<DateTime> values
)

Parameters

values  Vector<DateTime>
A Vector<T> of DateTime.

Return Value

TimeSpan
The standard deviation of the elements of values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<DateTime>. 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

ArgumentNullException

values is null.

StandardDeviation<T>(Vector<T>)

Returns the standard deviation of the elements of a vector.
C#
public static double StandardDeviation<T>(
	this Vector<T> values
)

Parameters

values  Vector<T>
A vector.

Type Parameters

T
The type of the elements of values.

Return Value

Double
The standard deviation of the elements of values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. 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

ArgumentNullException

values is null.

StandardDeviation<T>(T[], Boolean)

Returns the standard deviation of the elements of an array.
C#
public static double StandardDeviation<T>(
	this T[] values,
	bool skipMissingValues = false
)

Parameters

values  T[]
An array of values.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the calculation. The default is false.

Type Parameters

T
The type of the elements of values.

Return Value

Double
The standard deviation of the elements of values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type T[]. 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

ArgumentNullException

values is null.

StandardDeviation<T>(IEnumerable<T>, Boolean)

Returns the standard deviation of the elements of a sequence.
C#
public static double StandardDeviation<T>(
	this IEnumerable<T> values,
	bool skipMissingValues = false
)

Parameters

values  IEnumerable<T>
A sequence of values.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the calculation. The default is false.

Type Parameters

T
The type of the elements of values.

Return Value

Double
The standard deviation of the elements of values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<T>. 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

ArgumentNullException

values is null.

See Also