KURTOSIS - Teradata Database

SQL Functions, Operators, Expressions, and Predicates

Product
Teradata Database
Release Number
15.00
Language
English (United States)
Last Update
2018-09-24
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata® Database

KURTOSIS

Purpose  

Returns the kurtosis of the distribution of value_expression.

Syntax  

where:

 

Syntax element …

Specifies …

ALL

to include all non-null values specified by value_expression, including duplicates, in the computation. This is the default.

DISTINCT

to exclude duplicates specified by value_expression from the computation.

value_expression

a literal or column expression for which the kurtosis of the distribution of its values is to be computed.

The expression cannot contain any ordered analytical or aggregate functions.

ANSI Compliance

This is a Teradata extension to the ANSI SQL:2011 standard.

Definition

Kurtosis is the fourth moment of a distribution. It is a measure of the relative peakedness or flatness compared with the normal, Gaussian distribution.

The normal distribution has a kurtosis of 0.

Positive kurtosis indicates a relative peakedness of the distribution, while negative kurtosis indicates a relative flatness.

Result Type and Attributes

The data type, format, and title for KURTOSIS(x) are as follows.

 

Data Type

Format

Title

REAL

Default format of the REAL data type

Kurtosis(x)

For information on the default format of data types, see “Data Type Formats and Format Phrases” in SQL Data Types and Literals.

Support for UDTs

By default, Teradata Database performs implicit type conversion on a UDT argument that has an implicit cast that casts between the UDT and any of the following predefined types:

  • Numeric
  • Character
  • DATE
  • Interval
  • To define an implicit cast for a UDT, use the CREATE CAST statement and specify the AS ASSIGNMENT clause. For more information on CREATE CAST, see SQL Data Definition Language.

    Implicit type conversion of UDTs for system operators and functions, including KURTOSIS, is a Teradata extension to the ANSI SQL standard. To disable this extension, set the DisableUDTImplCastForSysFuncOp field of the DBS Control Record to TRUE. For details, see Utilities: Volume 1 (A-K).

    For more information on implicit type conversion of UDTs, see Chapter 13: “Data Type Conversions.”

    Computation

    The equation for computing KURTOSIS is defined as follows:

     

     

    where:

     

    This variable …

    Represents …

    x

    value_expression

    Conditions That Produce a NULL Return Value

    The following conditions produce a null return value:

  • Fewer than four non-null data points in the data used for the computation
  • STDDEV_SAMP(x) = 0
  • Division by zero