|   | NumericalAnalysisExtensionsStandardDeviationT(IEnumerableT, FuncT, Single, Boolean) Method | 
        
        
            Computes the standard deviation over a sequence of Single values.
            
        
        Namespace: GSF.NumericalAnalysisAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.257-beta+00aa2366fbb9ec75f636ebc7cfa610e3826a727c
 Syntax
Syntaxpublic static float StandardDeviation<T>(
	this IEnumerable<T> source,
	Func<T, float> selector,
	bool calculateForSample = false
)
<ExtensionAttribute>
Public Shared Function StandardDeviation(Of T) ( 
	source As IEnumerable(Of T),
	selector As Func(Of T, Single),
	Optional calculateForSample As Boolean = false
) As Single
public:
[ExtensionAttribute]
generic<typename T>
static float StandardDeviation(
	IEnumerable<T>^ source, 
	Func<T, float>^ selector, 
	bool calculateForSample = false
)
[<ExtensionAttribute>]
static member StandardDeviation : 
        source : IEnumerable<'T> * 
        selector : Func<'T, float32> * 
        ?calculateForSample : bool 
(* Defaults:
        let _calculateForSample = defaultArg calculateForSample false
*)
-> float32 JavaScript does not support generic types or methods.
Parameters
- source  IEnumerableT
- Source data sample.
- selector  FuncT, Single
- Used to map value from enumerable of T to enumerable of Single.
- calculateForSample  Boolean  (Optional)
- Set to true to calculate for estimated population size, or false for full population.
Type Parameters
- T
- Type of source used to extract float.
Return Value
SingleThe standard deviation of the sequence.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type 
IEnumerableT. 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
Exceptions| Exception | Condition | 
|---|
| ArgumentNullException | source is null. | 
| ArgumentOutOfRangeException | source does not contain enough values to produce a result. | 
 See Also
See Also