Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: edits/style, syntax
Scripting_function


Panel
titleDescription

Given a sequence of values, returns the population variance. Population variance calculates how values in a dataset are spread out from their average value.

Returns NaN (Not a Number) if passed an empty sequence.

Client permissions restrictions


Panel
titleSyntax

system.math.populationVariance(values)

  • Parameters

List[Float[] values - A sequence of numerical values. Accepts both integers and floats. The sequence may not contain None type values. However, passing a None type object instead of a Sequence sequence of numerical values will return NaN.

  • Returns

Float - The population variance, or NaN if the input was empty or null.

  • Scope

Gateway, Vision Client, Perspective Session

Panel
titleCode Example
Code Block
languagepy
titleCode Snippet - Calculating Population Variance
# Create a list of values.
values = [3.5, 5.6, 7.8, 7.4, 3.8]
 
# Print the resulting value.
print system.math.populationVariance(values)
Panel
titleKeywords

system math populationVariance, math.populationVariance