Skip to main content
Skip to main content

skewSamp

Computes the sample skewness of a sequence.

It represents an unbiased estimate of the skewness of a random variable if passed values form its sample.

skewSamp(expr)

Arguments

exprExpression returning a number.

Returned value

The skewness of the given distribution. Type — Float64. If n <= 1 (n is the size of the sample), then the function returns nan.

Example

SELECT skewSamp(value) FROM series_with_value_column;

skewSamp

Introduced in: v20.1

Computes the sample skewness of a sequence.

It represents an unbiased estimate of the skewness of a random variable if passed values form its sample.

Syntax

skewSamp(expr)

Arguments

  • expr — An expression returning a number. Expression

Returned value

Returns the skewness of the given distribution. If n <= 1 (n is the size of the sample), then the function returns nan. Float64

Examples

Symmetric distribution

SELECT skewSamp(number) FROM numbers(100);
┌─skewSamp(number)─┐
│                0 │
└──────────────────┘

Right-skewed distribution

SELECT skewSamp(x) FROM (SELECT pow(number, 2) AS x FROM numbers(10));
┌────────skewSamp(x)─┐
│ 0.5751042382747413 │
└────────────────────┘