skewness() / skewness_y() / skewness_x()

skewness(summary StatsSummary1D, method TEXT) RETURNS BIGINT
skewness_y(summary StatsSummary2D, method TEXT) RETURNS BIGINT
skewness_x(summary StatsSummary2D, method TEXT) RETURNS BIGINT

Calculate the skewness, or the third statisical moment, of the values contained in a statistical aggregate. In a two-dimensional stats_agg use the _y/ _x form to access the skewness of the dependent and independent variables.

The method determines whether you calculate a population or sample skewness. These values can be provided as their full names, or you can abbreviate them as pop or samp. These are the only four accepted values for the method argument. The default is sample.

For more information about statistical aggregate functions, see the hyperfunctions documentation.

Required arguments

summaryStatsSummary1D/StatsSummary2DThe already constructed data structure from a previous stats_agg call

Optional arguments

methodTEXTThe method for the calculation 'population' or 'sample' (default)


skewness/skewness_y/skewness_xDOUBLE PRECISIONThe skewness of the values in the statistical aggregate

Sample usage

SELECT skewness_x(stats_agg(data, data))
FROM generate_series(0, 100) data;

Found an issue on this page?

Report an issue!


Related Content