2

I was searching for Postgresql plpgsql functions to calculate "skewness" and "kurtosis" descriptive statistics functions, but I could not find any. It would be great if someone can share such plpgsql functions here. Thanks!

zlatko
  • 596
  • 1
  • 6
  • 23
  • 1
    Install [PL/Python](https://www.postgresql.org/docs/current/plpython.html) and use [scipy.stats](https://docs.scipy.org/doc/scipy/reference/stats.html#summary-statistics) – klin Feb 05 '19 at 21:43
  • 2
    Or try [stats_agg](https://github.com/ellisonch/PostgreSQL-Stats-Aggregate/). – Laurenz Albe Feb 06 '19 at 11:07

1 Answers1

2

There is a plpgsql function doing what I need, on github: https://github.com/ellisonch/PostgreSQL-Stats-Aggregate/blob/master/pg_stats_aggregate.sql

Now I need equivalent of Excel's NORMSINV function as well :-)

zlatko
  • 596
  • 1
  • 6
  • 23
  • 1
    I'm glad you've found it useful! It might be better to link to the main page so people can see the installation and usage information: https://github.com/ellisonch/PostgreSQL-Stats-Aggregate/ – Chucky Ellison Mar 06 '21 at 18:31