-- parameter must be consistent with "zipf_test.sql"
\set p 2.5
SELECT i, cnt,
  1.0 * LAG(cnt, 1) OVER (ORDER BY i) / cnt AS ratio,
  POWER(1.0 * i / LAG(i, 1) OVER (ORDER BY i), :p) AS expected
FROM zipf ORDER BY i ASC;
