MPNORMTEST Name
MPNORMTEST Author
Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
craigm@lheamail.gsfc.nasa.gov
UPDATED VERSIONs can be found on my WEB PAGE:
http://cow.physics.wisc.edu/~craigm/idl/idl.html
Purpose
Compute the probability of a given normally distributed Z value
Major Topics
Curve and Surface Fitting, Statistics
Calling Sequence
PROB = MPNORMTEST(Z, [/CLEVEL, /SLEVEL ])
Description
The function MPNORMTEST() computes the probability for the
magnitude of a value drawn from the normal distribution to equal or
exceed the given value Z. This can be used for confidence testing
of a measured value obeying the normal distribution.
P_NORM(ABS(X) > Z) = PROB
In specifying the returned probability level the user has two
choices:
* return the confidence level when the /CLEVEL keyword is passed;
OR
* return the significance level (i.e., 1 - confidence level) when
the /SLEVEL keyword is passed (default).
Note that /SLEVEL and /CLEVEL are mutually exclusive.
Inputs
Z - the value to best tested. Z should be drawn from a normal
distribution with zero mean and unit variance. If a given
quantity Y has mean MU and standard deviation STD, then Z can
be computed as Z = (Y-MU)/STD.
Returns
Returns a scalar or vector of probabilities, as described above,
and according to the /SLEVEL and /CLEVEL keywords.
Keyword Parameters
SLEVEL - if set, then PROB describes the significance level
(default).
CLEVEL - if set, then PROB describes the confidence level.
Examples
print, mpnormtest(5d, /slevel)
Print the probability for the magnitude of a randomly distributed
variable with zero mean and unit variance to exceed 5, as a
significance level. References
Algorithms taken from CEPHES special function library, by Stephen
Moshier. (http://www.netlib.org/cephes/)
Modification History
Completed, 1999, CM
Documented, 16 Nov 2001, CM
Reduced obtrusiveness of common block and math error handling, 18
Nov 2001, CM
Corrected error in handling of CLEVEL keyword, 05 Sep 2003
Convert to IDL 5 array syntax (!), 16 Jul 2006, CM
Move STRICTARR compile option inside each function/procedure, 9 Oct 2006
Add usage message, 24 Nov 2006, CM
Usage message with /CONTINUE, 23 Sep 2009, CM