2015-09-03 10:19:07 +08:00
|
|
|
-- continuous uniform distribution has kurtosis = -6/5, skewness = 0.0
|
|
|
|
-- http://mathworld.wolfram.com/UniformDistribution.html
|
2015-09-04 06:02:30 +08:00
|
|
|
set client_min_messages to ERROR;
|
2015-09-03 10:19:07 +08:00
|
|
|
|
2015-09-09 23:08:32 +08:00
|
|
|
WITH dist AS (
|
|
|
|
SELECT generate_series(0,10000)::numeric / 10000.0 i
|
2015-09-03 10:35:03 +08:00
|
|
|
)
|
2015-09-09 23:08:32 +08:00
|
|
|
SELECT
|
|
|
|
abs(CDB_Kurtosis(array_agg(i)) + 1.2) < 1e-3 AS kurtosis,
|
|
|
|
abs(CDB_Skewness(array_agg(i))) < 1e-3 AS skewness
|
2015-09-04 06:02:30 +08:00
|
|
|
FROM dist;
|
|
|
|
|
|
|
|
set client_min_messages to NOTICE;
|