Characteristic Functions

This section gives a brief overview of statistical characteristic functions and conventions that will permit them to be used with the fast Fourier transform as it is set up in Mathematica.  These techniques were developed to deal with stable distributions which have an explicit formula for the characteristic function but in most cases no formula for the density function.  The techniques are generalized so they can be used with any statistical distribution, even an unknown distribution using an empirical characteristic function.  

The characteristic function of a statistical distribution and its density function constitute a Fourier transform pair.  The form of the transform in mathematical statistics is derived from the expectation function, E(exp(i t x)), and is a little different from other disciplines.  For these pages, the terms: time domain and frequency domain from signal processing will be avoided; instead reference will be made to probability domain and transform domain.  The probability density function is a non-periodic function spread over a domain (-∞, ∞) of real numbers with most of the mass concentrated within a small range of the infinite domain.  Its transform, the characteristic function, can be sampled to give the discrete Fourier transform of a probability density, if it is sampled at equally spaced intervals.

ϕ(t)=(∫_(-∞)^∞)f(x) (e^(i t x))dx

f(x)=(1/(2 π))(∫_(-∞)^∞)ϕ(t) (e^(-i t x))dt

The first equation is the forward Fourier transform of the density function, f(x), to the characteristic function, ϕ(t).  The second equation is the inverse Fourier transform.  The forms use a plus-i convention requiring some parameter changes in Mathematica.  To have everything work from the continuous to the discrete, a consistent convention has to be maintained.  The FourierParameters -> {-1, 1} are used for the functions, Fourier and InverseFourier, to maintain the sign convention of mathematical statistics, but  t -> 2 π t has been substituted in the characteristic function to convert the statistical formula to the Fourier parameters chosen.  To convert between density functions and characteristic functions, FourierTransform and InverseFourierTransform require different parameters as shown below.

SetOptions[FourierTransform,FourierParameters-> {1,1}];
SetOptions[InverseFourierTransform,FourierParameters-> {1,1}];
SetOptions[Fourier, FourierParameters -> {-1,1}];
SetOptions[InverseFourier, FourierParameters -> {-1,1}];

SetOptions[FourierTransform, FourierParameters -> {1, 1}];
SetOptions[InverseFourierTransform, FourierParameters -> {1, 1}];
SetOptions[Fourier, FourierParameters -> {-1, 1}];
SetOptions[InverseFourier, FourierParameters -> {-1, 1}];

In this format the first element of the discrete Fourier transform list will be the mean of a data sample.

data = RandomReal[{0, 1}, 20];
Mean[data] == Chop[Fourier[data]][[1]]

data=RandomReal[{0,1},20];
Mean[data]==Chop[Fourier[data]][[1]]

Probabilitity distributions have some consistent features that are also important to keep in mind as one moves to the transform domain.  The density function is always real and greater than zero.

(∫_(-∞)^∞)f(x)dx=1

It's integral is equal to 1, in the transform domain this requires that equations below be true.  See Feller, Chapter 15, for a complete discussion of the properties of characteristic functions.  Symmetric densities will be real in the transform domain and skewed densities will be complex.

ϕ(0)=1

|ϕ(t)|≤1

The distribution function, F(x), is the cumulative integral of the density.  Since the density function is always positive, the distribution function is monotonically increasing and since the total integral is 1, F(x) is in the range (0, 1).

F(x)=(∫_(-∞)^x)f(t)dt

Stable distributions will be used for some examples; a brief description of their parameters follows.  Stable distributions can be defined by a characteristic function, but in most cases, its transform to the probability domain does not have a simple formula.  They can be approximated quite well with the FFT.  The characteristic function of a stable density in Nolan's 1-parameterization is given below along with a brief description of the parameters.

ϕ(t)=(e^(i t δ-(γ^α) ((|t|)^α) (1-i β sgn(t) tan(((π α)/2)))));            α≠1

ϕ(t)=(e^(i δ t-γ |t| (((2 i β log(|t|) sgn(t))/π)+1)));               α = 1

α is the shape parameter and has the range, (0, 2], when it is 2 the distribution is normal.
β is the skewness parameter and has the range, [-1, 1], when it is 0 the distribution is symmetric.
γ is the scale parameter with the range (0, ∞).
δ is the shift parameter with the range (-∞, ∞).

When α = 2, and σ/(Sqrt[2])  is substituted for γ, and μ substituted for δ, the result is the characteristic function for a standard normal distribution.

ϕ(t)=(e^(i t μ-(1/2) (σ^2) (t^2)))

For more information on stable distributions see John Nolan's website.

txcolor=RGBColor[181/255,18/255,27/255];
t1 = Graphics[Text[Hyperlink[Framed[Style["Financial Home", {txcolor, Bold, Larger}]], "../map/Overview.html"], {-5, 0}]];
t2 = Graphics[Text[Hyperlink[Framed[Style["Next", {txcolor, Bold, Larger}]], "../ft02/FFT.html"], {0, -0.5}]];
t3 = Graphics[Text[Hyperlink[Framed[Style["Download Notebook", {txcolor, Bold, Larger}]], "../ft01/CharacteristicFunction.nb"], {5, 0}]];
t4 = Graphics[Text[Hyperlink[Framed[Style["Previous", {txcolor, Bold, Larger}]], "../map/Overview.html"], {0, 0.5}]];
Show[ t1, t2, t3, t4, ImageSize -> 500]
CellPrint[TextCell["\n\n© Copyright " <> ToString[DateList[][[1]]] <> " mathestate    " <> DateString[DateList[], "DateShort"], "Text"]]

© Copyright 2009 mathestate    Fri 14 Aug 2009