# HP Forums

Full Version: Cumulative Normal Distribution
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The calculator keeps giving me zero when doing cumulative normal distribution in greater than values. for example.

If question says find area under curve when standard deviation is more than one deviation from mean. Using the books method it says put 1 as lower limit and a massive number as upper limit as so.
Normal_CDF(1,10^999,0,1) but i just get an answer of 0.

Hello Jib,

when I was young (@eric burdon) I learned, that this could only numerical solved. And if my memory is correct working, the error-function slows down very fast to zero. So when numerically integrating such a function and your upper limit is very big, the numerical integration told you: zero, because almost of the function values are zero and the distances are too big between two discrete position where a function value is calculated. So the numerical algorithm gets "blind" for such a small area different from zero.

Short story:
Try as a upper limit 10 and you get what you want.

Kind regards,
peacecalc
(08-29-2019 09:37 AM)peacecalc Wrote: [ -> ]Hello Jib,

when I was young (@eric burdon) I learned, that this could only numerical solved. And if my memory is correct working, the error-function slows down very fast to zero. So when numerically integrating such a function and your upper limit is very big, the numerical integration told you: zero, because almost of the function values are zero and the distances are too big between two discrete position where a function value is calculated. So the numerical algorithm gets "blind" for such a small area different from zero.

Short story:
Try as a upper limit 10 and you get what you want.

Kind regards,
peacecalc

Hi, thanks for the reply, but when i do that i get a different response than that of the book. heres an example perhaps will help.
Hi Jib,

Try NORMALD_CDF(0,1,-1.5,10000) and you get .933192799, which is the number in your book.

Take care, Steve
The example in your book is for the ti-Nspire calculator. The Nspire's syntax is:

normCdf(lowBound, upBound [,μ [,σ]])

So on the Nspire you could use normCdf(-1.5, 9.E999,0,1) as the book showed, or since μ=0 and σ=1 you could just use normCdf(-1.5, 9.E999).

The hp prime's syntax is:

NORMALD_CDF([μ, σ,] x, [x2])

So on the Prime you could use NORMALD_CDF(0,1,-1.5, 9e99), or just NORMALD_CDF(-1.5, 9e99).
As Wes just mentioned, you need to use the Prime format, which I just sent and below. Also note that PeaceCalc is correct - setting a value to just 10 (which 10 Std Dev for a 0,1 normal distribution) will get the exact same answer:

NORMALD_CDF(0,1,-1.5,10) also returns .933192799, which is the number in your book. Setting the range to 9e99 also works fine - same answer.

Take care, Steve
(08-29-2019 06:56 PM)Wes Loewer Wrote: [ -> ]The hp prime's syntax is:

NORMALD_CDF([μ, σ,] x, [x2])

So on the Prime you could use NORMALD_CDF(0,1,-1.5, 9e99), or just NORMALD_CDF(-1.5, 9e99).

If you wanted 1-sided CDF, it is faster just do NORMALD_CDF(1.5)

Result more accurate too, since it does not involve subtraction of 2 CDF's
Example: CDF(Z>6)

XCas> normal_cdf(6, 9e99) → 9.8658 77004e-10, error = +554 ULP
XCas> normal_cdf(-6) ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ → 9.8658 76449e-10, error = -1 ULP
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :