Post Reply 
Normal Probability Function
03-29-2022, 03:05 PM
Post: #7
RE: Normal Probability Function
(03-29-2022 12:00 PM)Paul Dale Wrote:  Upper Tail = 0.5*gammaq(0.5*x^2, 0.5)

Correction, factor off by 1/√(pi)

Γ(1/2, x²) = √(pi) * erfc(x)      // Abramowitz and Stegun, 6.5.17

P(x) = erfc(x/√2)/2 = Γ(1/2, x²/2) / (2*√(pi))

>>> from mpmath import *
>>> P1 = lambda x: erfc(x/sqrt(2))/2
>>> P2 = lambda x: gammainc(1/2,x*x/2) / (2*sqrt(pi))
>>> z = 1
>>> print P1(z), P2(z) # confirm P1 = P2
0.158655253931457 0.158655253931457

Quote:The common approach is to break the domain into two pieces and compute the function
using a series in one part and a continued fraction for the other.

For Xcas implementation of erf, see https://www.hpmuseum.org/forum/thread-15...#pid135589
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Normal Probability Function - CMarangon - 03-28-2022, 07:31 PM
RE: Normal Probability Function - Joe Horn - 03-28-2022, 09:11 PM
RE: Normal Probability Function - Mike T. - 03-29-2022, 09:51 AM
RE: Normal Probability Function - Albert Chan - 03-29-2022 03:05 PM
RE: Normal Probability Function - KeithB - 03-29-2022, 07:06 PM
RE: Normal Probability Function - trojdor - 03-30-2022, 08:02 AM



User(s) browsing this thread: 1 Guest(s)