({{, (RefLink[CharacteristicFunction, paclet:ref/CharacteristicFunction])[dist,t]
gives the characteristic function for the distribution dist as a function of the variable t.}, {, (RefLink[CharacteristicFunction, paclet:ref/CharacteristicFunction])[dist,{(Subscript[t, 1]),(Subscript[t, 2]),…}]
gives the characteristic function for the multivariate distribution dist as a function of the variables (Subscript[t, 1]), (Subscript[t, 2]), ….}})

OpenersNotesSection(Spacer1)Details

(RefLink[CharacteristicFunction, paclet:ref/CharacteristicFunction])[dist,t] is equivalent to (RefLink[Expectation, paclet:ref/Expectation])[(RefLink[Exp, paclet:ref/Exp])[i t x],x\[Distributed]dist].

(RefLink[CharacteristicFunction, paclet:ref/CharacteristicFunction])[dist,{(Subscript[t, 1]),(Subscript[t, 2]),…}] is equivalent to (RefLink[Expectation, paclet:ref/Expectation])[(RefLink[Exp, paclet:ref/Exp])[i t.x],x\[Distributed]dist] for vectors t and x.

The k(^th) moment can be extracted from a characteristic function cf through (RefLink[SeriesCoefficient, paclet:ref/SeriesCoefficient])[cf,{t,0,k}]k! (((-i))^k).

OpenersPrimaryExamplesSection(Spacer1)Examples  (26)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Characteristic function (cf) for the normal distribution:

CharacteristicFunction[NormalDistribution[μ,σ],t]

Characteristic function for the binomial distribution:

CharacteristicFunction[BinomialDistribution[n,p],t]

Characteristic function for the bivariate normal distribution:

CharacteristicFunction[BinormalDistribution[ρ],{(Subscript[t, 1]),(Subscript[t, 2])}]

Characteristic function for the multinomial distribution:

CharacteristicFunction[MultinomialDistribution[n,{(Subscript[p, 1]),(Subscript[p, 2]),(Subscript[p, 3])}],{(Subscript[t, 1]),(Subscript[t, 2]),(Subscript[t, 3])}]

OpenersExampleSection1(Spacer1)Scope  (8)

Characteristic function for a specific continuous distribution:

CharacteristicFunction[StudentTDistribution[5],t]

Characteristic function for a specific discrete distribution:

CharacteristicFunction[DiscreteUniformDistribution[{4,10}],t]

Characteristic function at a particular value:

CharacteristicFunction[HalfNormalDistribution[1],2]

Characteristic function evaluated numerically:

CharacteristicFunction[LogisticDistribution[0,1],2.0]

Obtain a result at any precision:

CharacteristicFunction[LogisticDistribution[0,1],N[2,25]]

Compute the characteristic function for a formula distribution:

dist=ProbabilityDistribution[((BesselK[0,x])/(Pi/2)),{x,0,∞}];

CharacteristicFunction[dist,t]

Find the characteristic function for a parameter mixture distribution:

dist=ParameterMixtureDistribution[LaplaceDistribution[0,σ],σ\[Distributed]UniformDistribution[]];

CharacteristicFunction[dist,t]//FullSimplify

Characteristic function for the slice distribution of a random process:

CharacteristicFunction[PoissonProcess[μ][s],t]

OpenersExampleSection2(Spacer1)Applications  (7)

Compute the raw moments for a Poisson distribution:

cfun=CharacteristicFunction[PoissonDistribution[μ],t]

First 5 raw moments using derivatives of the characteristic function at the origin:

Table[Limit[D[cfun,{t,n}],t->0]/I^n,{n,5}]

Use (RefLink[Moment, paclet:ref/Moment]) directly:

Table[Moment[PoissonDistribution[μ],n],{n,5}]

Simplify[%%-%]

Compute mixed raw moments for a multivariate t distribution:

CharacteristicFunction[MultivariateTDistribution[{{1,r},{r,1}},3],{t1,t2}]

Limit[Limit[D[%,t1,t2],t1->0],t2->0]/I^2

Use (RefLink[Moment, paclet:ref/Moment]) to obtain raw moments directly:

Moment[MultivariateTDistribution[{{1,r},{r,1}},3],{1,1}]

Find raw moments of a Student t distribution from its characteristic function:

cfun=PiecewiseExpand[CharacteristicFunction[StudentTDistribution[5],t],t∈Reals]

Compute (lim_(t->0)) (((-i))^n) Derivative[n][ϕ](t) to extract moments by taking limits from the right:

Table[Limit[(-I)^n D[cfun,{t,n}],t->0,Direction->-1],{n,5}]

Evaluate the limits from the left:

Table[Limit[(-I)^n D[cfun,{t,n}],t->0,Direction->1],{n,5}]

Only the first four moments are defined, as confirmed by using (RefLink[Moment, paclet:ref/Moment]) directly:

Table[Moment[StudentTDistribution[5],r],{r,5}]

Use inverse Fourier transform to compute the PDF corresponding to a characteristic function:

pdf=InverseFourierTransform[Exp[-t^2],t,x,FourierParameters->{1,1}]

Plot[pdf,{x,-5,5}]

NIntegrate[pdf,{x,-∞,∞}]

Illustrate the central limit theorem on the example of symmetric (RefLink[LaplaceDistribution, paclet:ref/LaplaceDistribution]):

dist=LaplaceDistribution[0,σ];

Find the characteristic function of the rescaled random variate:

CharacteristicFunction[dist,t/(Sqrt[n Variance[dist]])]

Compute the large n limit of the cf of the sum of n such i.i.d. random variates:

Limit[%^n,n->Infinity]

Compare with the characteristic function of a standard normal variate:

CharacteristicFunction[NormalDistribution[],t]

Use smooth characteristic function to construct the upper bound for the distribution density of (RefLink[ErlangDistribution, paclet:ref/ErlangDistribution]):

𝒟=ErlangDistribution[4,1];

chf=CharacteristicFunction[𝒟,t]

UpperBound1=(1/(2Pi))Integrate[Abs[chf],{t,-Infinity,Infinity}]

UpperBound2=(1/(2Pi))(1/(x^2))Integrate[Abs[D[chf,{t,2}]],{t,-Infinity,Infinity}]

Plot the upper bounds and the original density:

Plot[{PDF[𝒟,x],UpperBound1,UpperBound2},{x,0,10}]

Verify that the sum (∑_(k=1)^n)(Subscript[d, k])/(2^k) where (Subscript[d, k]) are independent identically distributed (RefLink[BernoulliDistribution, paclet:ref/BernoulliDistribution])[1/2] variates tends in distribution to (RefLink[UniformDistribution, paclet:ref/UniformDistribution])[] for large n:

(Subscript[cf, k])=CharacteristicFunction[TransformedDistribution[((Subscript[d, k])/(2^k)),(Subscript[d, k])\[Distributed]BernoulliDistribution[(1/2)]],t]

Use a combinatorial equality for product (∏_(k=1)^n)(Subscript[cf, k]):

Table[(∏_(k=1)^n)((1/2)+(1/2) (E^((I t)/(2^k))))==(1/(2^n))(∑_(k=0)^((2^n)-1))Exp[((I t k)/(2^n))],{n,6}]//Simplify

Evaluate the sum:

chf=(1/(2^n))(∑_(k=0)^((2^n)-1))Exp[((I t k)/(2^n))]

Take the limit and compare it to the characteristic function of the (RefLink[UniformDistribution, paclet:ref/UniformDistribution]):

{Limit[ComplexExpand[chf],n->∞],CharacteristicFunction[UniformDistribution[],t]}//TrigToExp

OpenersExampleSection3(Spacer1)Properties & Relations  (5)

(RefLink[CharacteristicFunction, paclet:ref/CharacteristicFunction]) is the (RefLink[Expectation, paclet:ref/Expectation]) of (e^(i t x)) for real t:

Expectation[Exp[I t x],x\[Distributed]UniformDistribution[{min,max}],Assumptions->Element[t,Reals]]

CharacteristicFunction[UniformDistribution[{min,max}],t]

%%-%

The characteristic function is related to all other generating functions when they exist:

𝒟=PolyaAeppliDistribution[μ,p];

{MomentGeneratingFunction[𝒟,I t],CharacteristicFunction[𝒟,t]}

{Exp[CumulantGeneratingFunction[𝒟,I t]],CharacteristicFunction[𝒟,t]}

{FactorialMomentGeneratingFunction[𝒟,t],CharacteristicFunction[𝒟,-I Log[t]]}

The cf of a continuous distribution is equivalent to (RefLink[FourierTransform, paclet:ref/FourierTransform]) of its (RefLink[PDF, paclet:ref/PDF]):

FourierTransform[PDF[CauchyDistribution[0,1],x],x,t,FourierParameters->{1,1}]

CharacteristicFunction[CauchyDistribution[0,1],t]

The cf of a discrete distribution is equivalent to (RefLink[FourierSequenceTransform, paclet:ref/FourierSequenceTransform]) of its (RefLink[PDF, paclet:ref/PDF]):

FourierSequenceTransform[PDF[PoissonDistribution[μ],x],x,t,FourierParameters->{1,1},Assumptions->μ>0]

CharacteristicFunction[PoissonDistribution[μ],t]

The PDF is the inverse Fourier transform of the cf for continuous distributions:

cf=CharacteristicFunction[NormalDistribution[μ,σ],t]

InverseFourierTransform[cf,t,x,Assumptions->μ∈Reals&&σ>0,FourierParameters->{1,1}]

PDF[NormalDistribution[μ,σ],x]

Simplify[%%-%,σ>0]

The (RefLink[PDF, paclet:ref/PDF]) is the inverse Fourier sequence transform of the cf for discrete distributions:

cf=CharacteristicFunction[GeometricDistribution[p],t]

InverseFourierSequenceTransform[cf,t,-n,FourierParameters->{1,1}]//FullSimplify[#,0<p<1]&//PiecewiseExpand

PDF[GeometricDistribution[p],n]

%-%%

OpenersExampleSection4(Spacer1)Possible Issues  (1)

Symbolic closed forms do not exist for some distributions:

CharacteristicFunction[LogNormalDistribution[μ,σ],t]

OpenersExampleSection5(Spacer1)Neat Examples  (1)

Visualize real and imaginary parts of (RefLink[CharacteristicFunction, paclet:ref/CharacteristicFunction]) for random instances of (RefLink[BinomialDistribution, paclet:ref/BinomialDistribution]):

Plot[MapThread[ReIm[CharacteristicFunction[BinomialDistribution[#1,#2],t]]&,{RandomInteger[{4,16},5],RandomReal[1,5]}]//Flatten//Evaluate,{t,-4,4},PlotRange->All]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Expectation, paclet:ref/Expectation])  ▪  (RefLink[FourierTransform, paclet:ref/FourierTransform])  ▪  (RefLink[FourierSequenceTransform, paclet:ref/FourierSequenceTransform])  ▪  (RefLink[MomentGeneratingFunction, paclet:ref/MomentGeneratingFunction])  ▪  (RefLink[CumulantGeneratingFunction, paclet:ref/CumulantGeneratingFunction])  ▪  (RefLink[Moment, paclet:ref/Moment])  ▪  (RefLink[PDF, paclet:ref/PDF])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Discrete Distributions, paclet:tutorial/DiscreteDistributions])}, {▪(RefLinkPlain[Continuous Distributions, paclet:tutorial/ContinuousDistributions])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Fourier Analysis, paclet:guide/FourierAnalysis])}, {▪(RefLinkPlain[Statistical Moments and Generating Functions, paclet:guide/StatisticalMomentsAndGeneratingFunctions])}, {▪(RefLinkPlain[Statistical Distribution Functions, paclet:guide/StatisticalDistributionFunctions])}, {▪(RefLinkPlain[Descriptive Statistics, paclet:guide/DescriptiveStatistics])}})}})