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 For Xcas implementation of erf, see https://www.hpmuseum.org/forum/thread-15...#pid135589 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)