Standard Normal Distribution Script
Webb - all rights reserved - ©2004
Author - Russ Lenth

Summary: pdf, cdf, and quantile of the N(0,1) distribution.

Instructions: This adds basic functionality for the normal distribution.

The pdf at z is the function phi(z) = exp(-.5 z^2) / sqrt(2pi).

The cdf is the function Phi(z) = integral phi(t)dt from t = -infinity to t = z.

The quantile is the solution z to the equation Phi(z) = p where p is the value supplied.

The algorithm for the cdf is (26.2.16) in Abramowitz and Stegun, which is accurate to +/- 1e-5. (It'd be easy but bulkier to use (26.2.17), accurate to +/ -1e-8).

The quantile is obtained using the Tukey's lambda approximation z = 4.92{p^.14 - (1-p)^.14} as a starter, and doing one Newton step.



"Normal dist"
"_p(x): pdf"Cd;
"_P(x): cdf"Cp;
"_Q(x): quantile"Cq;