 Dataplot Vol 2 Vol 1

# SKEWNESS

Name:
SKEWNESS (LET)
Type:
Let Subcommand
Purpose:
Compute the skewness (or standardized third central moment) of a variable.
Description:
Skewness measures the lack of symmetry in a variable. The formula for the Fisher-Pearson skewness coefficient is:

$g_{1} = \frac{\sum_{i=1}^{n}{(x_{i} - \bar{x})}/n} {s^{3}}$

where $$\bar{x}$$, s, and n are the sample mean, the sample standard deviation, and the sample size, respectively. Note that in computing the skewness, the standard deviation is computed using n in the denominator rather than n - 1.

The adjusted Fisher-Pearson skewness coefficient is:

$G_{1} = \frac{\sqrt{n(n-1)}}{n-2} \frac{\sum_{i=1}^{n}{(x_{i} - \bar{x})}/n} {s^{3}}$

This provides a correction factor to adjust for the sample size. This adjustment factor approaches 1 as the sample size gets large.

In Dataplot, you can specify that the adjusted form of the statistic be computed by entering the command

To reset the unadjusted skewness statistic, enter

SET SKEWNESS DEFINITION FISHER-PEARSON

There are many alternative definitions of skewness in the literature. Dataplot supports the following two additional definitions of skewness.

The Galton skewness (also known as Bowley's skewness) is defined as

$\mbox{Galton skewness} = \frac{Q_{1} + Q_{3} -2 Q_{2}}{Q_{3} - Q_{1}}$
where Q1 is the lower quartile, Q3 is the upper quartile, and Q2 is the median.

The Pearson 2 skewness coefficient is defined as

$S_{k_2} = 3 \frac{(\bar{Y} - \tilde{Y})}{s}$
where $$\tilde{Y}$$ is the sample median.
Syntax 1:
LET <par> = SKEWNESS <y>       <SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<par> is a parameter where the skewness is saved;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

This syntax computes the Fisher-Pearson skewness.

Syntax 2:
LET <par> = GALTON SKEWNESS <y>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<par> is a parameter where the skewness is saved;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

This syntax computes the Galton skewness.

Syntax 3:
LET <par> = PEARSON TWO SKEWNESS <y>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<par> is a parameter where the skewness is saved;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

This syntax computes the Pearson two skewness.

Examples:
LET A = SKEWNESS Y1
LET A = GALTON SKEWNESS Y1
LET A = PEARSON TWO SKEWNESS Y1
LET A = SKEWNESS Y1 SUBSET Y1 > 0
Note:
The skewness for a normal distribution is zero. Symmetric data should have a skewness near zero. Negative values for the skewness indicate data that are skewed left and positive values for the skewness indicate data that are skewed right. By skewed left, we mean that the left tail is long relative to the right tail. Similarly, skewed right means that the right tail is long relative to the left tail. Note that if the data are multi-modal, then this may affect the sign of the skewness.

Measurement data is often bounded below (e.g., the measurement must be positive) but not above. This type of data will frequently exhibit right skewness.

Note:
Dataplot statistics can be used in a number of commands. For details, enter

Default:
None
Synonyms:
STANDARDIZED THIRD CENTRAL MOMENT
STANDARDIZED 3RD CENTRAL MOMENT
PEARSON 2 SKEWNESS
PEARSON TYPE TWO SKEWNESS
PEARSON TYPE 2 SKEWNESS
Related Commands:
 MEAN = Compute mean of a variable. STANDARD DEVIATION = Compute the standard deviation of a variable. KURTOSIS = Compute the Kurtosis of a variable.
Applications:
Data Analysis
Implementation Date:
Pre-1987
Program:

skip 25
.
let s1 = skewness y
set skewness definition adjusted fisher pearson
let s2 = skewness y
let s3 = galton skewness y
let s4 = pearson two skewness y
.
set write decimals 4
print s1 s2 s3 s4

The following output is generated

PARAMETERS AND CONSTANTS--

S1      --         0.0329
S2      --         0.0356
S3      --        -0.2280
S4      --        -0.4449


NIST is an agency of the U.S. Commerce Department.

Date created: 12/14/2014
Last updated: 05/08/2017