Skip to main content
Version: 8.1

system.math.skewness

This function is used in Python Scripting.

Description​

Given a sequence of values, calculates the skewness (third central moment). Skewness is a measure of the degree of asymmetry of a distribution of the mean. If skewed to the left, the distribution has a long tail in the negative direction. If skewed to the right, the tail will be skewed in the positive direction. Skewness values greater than 1 or less than -1 indicate a highly skewed distribution, while skewness values between 0.5 and 1 or -0.5 and -1 indicate a moderately skewed distribution. Finally, skewness values between -0.5 and 0.5 indicate a more symmetrical distribution.

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

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.math.skewness(values)

Parameters​

TypeParameterDescription
List[Float]valuesA 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 skewness of the values parameter, or NaN if values was empty or null.

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Example #1 - Calculating Skewness
# Create a list of values.
values = [3.5, 5.6, 7.8, 7.4, 3.8]

# Print the resulting value.
print system.math.skewness(values)

Keywords​

system math skewness, math.skewness