Merge branch 'add-kurtosis' of https://github.com/CartoDB/cartodb-postgresql into add-kurtosis

master
Andy Eschbacher 9 years ago
commit b5a9fb9fcf

@ -1 +1 @@
scripts-available/CDB_Stats.sql
../scripts-available/CDB_Stats.sql

@ -1,5 +1,6 @@
-- continuous uniform distribution has kurtosis = -6/5, skewness = 0.0
-- http://mathworld.wolfram.com/UniformDistribution.html
set client_min_messages to ERROR;
With dist As (
SELECT random()::numeric As val
@ -10,4 +11,6 @@ SELECT
-- does random dist values match within 1% of known values
abs(CDB_Kurtosis(array_agg(val)) + 1.20) < 1e-2 As kurtosis,
abs(CDB_Skewness(array_agg(val)) - 0) < 1e-2 As skewness
FROM dist
FROM dist;
set client_min_messages to NOTICE;

@ -1 +1,3 @@
true|true
SET
t|t
SET

Loading…
Cancel
Save