martin rosenblatt wrote:

> I hope this isn't a dumb question, but I have not been able to find 
> a module or any example of a Perl script that uses the standard Normal
> Distribution function or the Cumulative Normal Distribution function.
> 
> I have searched the obvious places with no success, can you help me.

Are you referring to the Math::CDF module?

 NAME

Math::CDF - Generate probabilities and quantiles from several 
statistical probability functions

SYNOPSIS

use Math::CDF;

$prob = &Math::CDF::pnorm(1.96);

if( not defined($z = &Math::CDF::qnorm(0.975)) ) {
    die "qnorm() failed"; }

or

use Math::CDF qw(:all);

$prob = pnorm(1.96);

DESCRIPTION

This module provides a perl interface to the DCDFLIB. See the section on
DCDFLIB for more information.

Functions are available for 7 continuous distributions (Beta,
Chi-square, F, Gamma, Normal, Poisson and T-distribution) and for 
two discrete distributions (Binomial and Negative Binomial). Optional
non-centrality parameters are available for the Chi-square, F and 
T-distributions. Cumulative probabilities are available for all 9 
distributions and quantile functions are available for the 7 continuous 
distributions.

All cumulative probability function names begin with the character "p".
They give the probability of being less than or equal to the given value
[ P(X <= x) ]

All quantile function names begin with the character q. They give a value
of x such that P(X <= x) = p where the value of p is provided to the
function.

Non-centrality parameters are always the last function argument when
available. You do not need to supply the non-centrality parameter in which
case it will be assumed to be 0.

All functions will return an undefined value if the function fails 
(probably due to parameters being out of allowed range) but will not
otherwise generate an error message. The user should check for valid output
from the Math::CDF functions with the defined() function as demonstrated in
the SYNOPSIS section.

FUNCTION DESCRIPTIONS

In all, 16 functions are available via Math::CDF:

    pbeta(), qbeta()          [Beta Distribution]
    pchisq(), qchisq()        [Chi-square Distribution]
    pf(), qf()                [F Distribution]
    pgamma(), qgamma()        [Gamma Distribution]
    pnorm(), qnorm()          [Standard Normal Dist]
    ppois(), qpois()          [Poisson Distribution]
    pt(), qt()                [T-distribution]
    pbinom()                  [Binomial Distribution]
    pnbinom()                 [Negative Binomial Distribution]
[...]

--
Clay Irving
[EMAIL PROTECTED]

Reply via email to