Date: Tue, 21 May 2002 18:18:55 GMT "Peter J. Acklam" "SAS(r) Discussion" "Peter J. Acklam" Private Re: Gaussian Distribution 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