Post Reply 
Normal Probability Function
03-29-2022, 12:39 PM
Post: #6
RE: Normal Probability Function
(03-29-2022 02:53 AM)CMarangon Wrote:  I got these formulas from my Casio FX-5000F.
They work!

Yes ... but not well.
It seems formula converted from https://www.johndcook.com/blog/cpp_erf/
For upper tail area, to be more accurate, we use erfc(x) = 1 - erf(x)

ERFC(x) := horner([1.061405429,-1.453152027,1.421413741,-0.284496736,0.254829592,0],
1/(1+0.3275911*x)) * exp(-x*x)

P(x) := ERFC(x/sqrt(2))/2

However, formula is sensitive with constants, slight rounding may mess up everything.

With above setup, max absolute error about 7e-8
With Casio setup, max absolute error goes up to 83e-8

Worse case, at x = 0.32:
ERFC  P(x) = 0.37448 42341
Casio P(x) = 0.37448 49931
True  P(x) = 0.37448 41653

Error Ratio = (41653-49931) / (41653-42341) = -8278/-688 ≈ 12.
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 - Albert Chan - 03-29-2022 12:39 PM
RE: Normal Probability Function - Mike T. - 03-29-2022, 09:51 AM
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: 2 Guest(s)