Re: standard normal cumulative distribution function

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: standard normal cumulative distribution function
Дата
Msg-id 20060120235400.GA87107@winnie.fuhr.org
обсуждение исходный текст
Ответ на standard normal cumulative distribution function  (SunWuKung <Balazs.Klein@axelero.hu>)
Ответы Re: standard normal cumulative distribution function  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
On Sat, Jan 21, 2006 at 12:00:49AM +0100, SunWuKung wrote:
> Does somebody have/know of a function for pg returning the standard
> normal cumulative distribution for a Z score?

Are you looking for something like this?

test=> SELECT z, cdf_ugaussian_p(z) FROM generate_series(-3, 3) AS g(z);
 z  |   cdf_ugaussian_p
----+---------------------
 -3 | 0.00134989803163009
 -2 |  0.0227501319481792
 -1 |   0.158655253931457
  0 |                 0.5
  1 |   0.841344746068543
  2 |   0.977249868051821
  3 |    0.99865010196837
(7 rows)

cdf_ugaussian_p() is just a little wrapper I put around the GNU
Scientific Library's gsl_cdf_ugaussian_P() function.  I can post
an example of how to do that if it's what you're looking for.

--
Michael Fuhr

В списке pgsql-general по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Page-Level Encryption
Следующее
От: SunWuKung
Дата:
Сообщение: Re: standard normal cumulative distribution function