Cumulative Normal Distribution
08-29-2019, 09:21 AM
Post: #1
 Jib Junior Member Posts: 13 Joined: Sep 2018
Cumulative Normal Distribution
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.

08-29-2019, 09:37 AM
Post: #2
 peacecalc Member Posts: 139 Joined: Dec 2013
RE: Cumulative Normal Distribution
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:46 AM
Post: #3
 Jib Junior Member Posts: 13 Joined: Sep 2018
RE: Cumulative Normal Distribution
(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.

Attached File(s) Thumbnail(s)

08-29-2019, 04:15 PM
Post: #4
 swagner53 Junior Member Posts: 6 Joined: Jun 2018
RE: Cumulative Normal Distribution
Hi Jib,

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

Take care, Steve
08-29-2019, 06:56 PM
Post: #5
 Wes Loewer Member Posts: 164 Joined: Jan 2014
RE: Cumulative Normal Distribution
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).
08-29-2019, 07:29 PM
Post: #6
 swagner53 Junior Member Posts: 6 Joined: Jun 2018
RE: Cumulative Normal Distribution
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, 08:45 PM (This post was last modified: 09-14-2019 01:22 AM by Albert Chan.)
Post: #7
 Albert Chan Senior Member Posts: 696 Joined: Jul 2018
RE: Cumulative Normal Distribution
(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
 « Next Oldest | Next Newest »

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