Statistics::Distrib::Normal - the normal distribution

use Statistics::Distrib::Normal;

$dist = new Statistics::Distrib::Normal;

$dist->mu(3); # set the location parameter $dist->sigma(5); # set the scale parameter @x = $dist->rand(10); # generate random numbers

# or

@x = Statistics::Distrib::Normal->new(Mu => 3, Sigma => 5)->rand(10);

This module contains miscellaneous functions related to the normal distribution.

**new ( [ OPTIONS ] )**-
`OPTIONS`

is a list of options given in the form of key-value pairs, just like a hash table. Valid options are**Mu**- Sets the mu parameter (the mean) of the distribution to the specified value.
**Sigma**- Sets the sigma parameter (the standard deviation) of the distribution to the specified value.

**mean ( [ MEAN ] )**- Set the mu parameter (the mean) of the distribution to
`MU`

. If`MU`

is omitted, the current value of mu is returned. **sigma ( [ SDEV ] )**- Set the sigma parameter (the standard deviation) of the distribution to
`SIGMA`

. If`SIGMA`

is omitted, the current value of sigma is returned. **pdf ( X1 [, X2 [, X3 ... ] ] )**- Evaluate the probability density function at
`X1`

,`X2`

,`X3`

, ... **ltp ( X1 [, X2 [, ... ] ] )**- Evaluate the lower tail probability function at
`X1`

,`X2`

,`X3`

, ... **utp ( X1 [, X2 [, ... ] ] )**- Evaluate the upper tail probability function at
`X1`

,`X2`

,`X3`

, ... **ltq ( P1 [, P2 [, ... ] ] )**- Returns the lower tail quantile for the probabilities
`P1`

,`P2`

,`P3`

, ... **utq ( P1 [, P2 [, P3 ... ] ] )**- Returns the upper tail quantile for the probabilities
`P1`

,`P2`

,`P3`

, ... **intprob( XLOW, XHIGH )**- Interval probability. Returns the probability of an outcome in the interval from XLOW to XHIGH.
**rand( [ NUM ] )**- Generate random variables. If
`NUM`

is omitted, a single variable is returned. **expectation ()**- Return the expectation of the distribution.
**variance ()**- Return the variance of the distribution.
**skewness ()**- Return the skewness of the distribution.
**kurtosis ()**- Return the kurtosis (normalized) of the distribution.
**dmo**-
Direct moments for the distribution.
Not implemented yet.

**cmo**- Central moments for the distribution.
**mode ()**- Returns the mode of the distribution.

None known.

Degenerate cases are not allowed for most methods; e.g., a distribution with zero variance.

**Version 0.02**- Code formatting changes.
**Version 0.01**- First release.

Peter John Acklam <pjacklam@online.no>.

Copyright 1999-2000 Peter John Acklam. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.