CStats:SdevValue CStats:Stats

CStats:Skewness


The Skewness method computes the statistical skewness of a data sample.

Skewness characterizes the symmetry of the distribution of values in the sample. A skewness value of 0 describes a symmetric distribution. Skewness greater than 0 indicates a positive bias ("positive tail") and skewness less than 0 indicates a negative bias ("negative tail").

Syntax

nSkewness = CStats:Skewness( CImage, CRect )

nSkewness = CStats:Skewness( CImage )

nSkewness = CStats:Skewness( table )

bullet.gif    CRect is a bounding rectangle for the CImage object.

bullet.gif    table is a 1-dimensional array containing numbers.

bullet.gif    On success, returns the skewness.

bullet.gif    On failure, returns 0.

Example

Suppose a CImage named I and a CRect named R exist. The following script returns the skewness inside a rectangle on the image:

S = new_stats()

-- create a CStats object

-- specify CImage and CRect to measure

 

nVal = S:Skewness(I, R)

-- returns the skewness

Printf("Skewness=%lg\n", nVal)

-- list the results

S:delete()

-- when done with S, remove it from memory

Related Topics

CStats class, Mean, Kurtosis, CImage class, CRect class


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.