Type of elements within the source iterable.
The source iterable to inspect.
Optionalselector: Selector<TElement, number>Optional projection that extracts the numeric value for each element. Defaults to the element itself.
Optionalsample: booleanWhen true, computes the sample variance dividing by n - 1; when false, computes the population variance dividing by n. Defaults to true.
The calculated variance, or NaN when source is empty—or for sample variance when it contains a single element.
Calculates the variance of the numeric values produced by source.