### General Orthogonal Series Representation

The package discussed here finds a formal series for a probability density function of the following general form. The specific parameters of this representation are given for the Gram-Charlier series, Gamma-series and Beta-series in the following section. For a density function, , the formal series representation is

where is an orthogonal polynomial of degree with respect to the weight function on an interval , so

Parameters of the orthogonal polynomial sequence, , along with and are chosen to assure that and to assure maps into . (The latter is not possible for all combinations of and .) Note that, since is a polynomial, the integral in the definition of is simply a linear combination of the moments of . Therefore,

where

and

A series representation for the cumulative distribution function

is also possible. After substituting equation (1) into equation (8), takes the following form.

In the previous expression, is a sequence of orthogonal polynomials of the same type (Hermite, Generalized Laguerre, ) as . The are identical to those in equation (1). The integral on the right-hand side of equation (9) is a standard "special function" (and Mathematica function) for the series considered here.