LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 21 May 2002 18:18:55 GMT
Reply-To:   "Peter J. Acklam" <pjacklam@ONLINE.NO>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Peter J. Acklam" <pjacklam@ONLINE.NO>
Organization:   Private
Subject:   Re: Gaussian Distribution
Content-Type:   text/plain; charset=us-ascii

"David Jones" <dajxxx@ceh.ac.uk> wrote:

> If extreme cases are wanted, Biometrika Tables Vol 1 may be > useful. For example, it gives the upper tail area above X=500 > as exp(-54289.90830), which is pretty small.

Hmm. That's not what I get.

normcdf(x) = 0.5 * erfc(-x / sqrt(2))

Now,

erfcx(x) = exp(x^2) * erfc(x)

so

normcdf(x) = 0.5 * erfcx(-x / sqrt(2)) / exp(x^2/2)

and

log(normcdf(x)) = log( 0.5 * erfcx(-x / sqrt(2)) / exp(x^2/2) )

= log(0.5) + log(erfcx(-x / sqrt(2))) - log(exp(x^2/2))

= log(0.5) + log(erfcx(-x / sqrt(2))) - x^2/2

If x = -500 I get

lognormcdf(-500) = -125007.133550632

Inserting two well-known constants (for statisticians) gives me

lognormcdf(-1.96) = -3.68896365172964

exp(-3.68896365172964) = 0.0249978951482204 (approx 2.5%)

and

lognormcdf(-1.6449) = -2.99582792876188

exp(-2.99582792876188) = 0.0499952174683462 (approx 5%)

so my outline above seems correct...

Peter

-- I followed a bit stream. I found a bit river.


Back to: Top of message | Previous page | Main SAS-L page