kurtosis() / kurtosis_y() / kurtosis_x()

kurtosis(summary StatsSummary1D, method TEXT) RETURNS BIGINT
kurtosis_y(summary StatsSummary2D, method TEXT) RETURNS BIGINT
kurtosis_x(summary StatsSummary2D, method TEXT) RETURNS BIGINT

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

The method determines whether you calculate a population or sample kurtosis. 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

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

Optional arguments

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

Returns

ColumnTypeDescription
kurtosis/kurtosis_y/kurtosis_xDOUBLE PRECISIONThe kurtosis of the values in the statistical aggregate

Sample usage

SELECT kurtosis_y(stats_agg(data, data))
FROM generate_series(0, 100) data;
kurtosis_y 
------------
    1.78195

Found an issue on this page?

Report an issue!

Related Content