Versions Compared

Key

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


Panel
titleDescription

Given two sequences of values, calculates the mean of the signed difference between both sequences. In other words, returns the absolute difference between the mean values of two different sets of data.

Throws a DimensionMismatchException if the two sequences have different lengths.

Client permissions restrictions


Panel
titleSyntax

system.math.meanDifference(values1, values2)

  • Parameters

List[Float[] values1 - 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 of numerical values will return NaN.

List[Float[] values2 - 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 of numerical values will return NaN.

  • Returns

Float - The mean difference, or NaN if one of the parameters was empty or null.

  • Scope

Gateway, Vision Client, Perspective Session

Panel
titleCode Example
Code Block
languagepy
titleCode Snippet - calculating Mean Difference
# Create some lists.
firstList = [3.5, 5.6, 7.8, 7.4, 3.8]
secondList = [3.5, 5.6, -7.8, 7.4, -3.8]
   
# Prints the resulting value.
print system.math.meanDifference(firstList, secondList)
Panel
titleKeywords

system math meanDifference, math.meanDifference