Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Fourier Transform PDF Characteristic Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14955] Fourier Transform PDF Characteristic Function
  • From: "Yves Gauvreau" <gauy at videotron.ca>
  • Date: Fri, 27 Nov 1998 03:49:53 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I'm trying to find the PDF from a Characteristic Function using
Mathematica. I'm not a mathematician just a curious guy. Here is the
problem (this is a paste from the notebook).

----------------------------------------------------------------------------
-------------------------------------------------------- 
Load the needed packages
<<Statistics`NormalDistribution`
<<Calculus`FourierTransform`
This is the CharacteristicFunction of a NormalDistribution In[3]:=
CF=CharacteristicFunction[NormalDistribution[\[Mu],\[Sigma]],t] Out[3]=
\!\(E\^\(I\ t\ \[Mu] - \(t\^2\ \[Sigma]\^2\)\/2\)\) Also this is suppose
to be the FourierTransform of a NormalDistribution PDF In[5]:=
ft=FourierTransform[PDF[NormalDistribution[\[Mu],\[Sigma]],x],x,t]
Out[5]=
\!\(E\^\(I\ t\ \[Mu] - \(t\^2\ \[Sigma]\^2\)\/2\)\) Now with the
InverseFourierTransform we are suppose to get back the
NormalDistribution PDF
In[6]:=
InverseFourierTransform[ft,t,x]
Out[6]=
\!\(InverseFourierTransform[E\^\(I\ t\ \[Mu] - \(t\^2\
\[Sigma]\^2\)\/2\), t,
    x]\)
As you can see it doesn't give back the NormalDistribution PDF even if I
use the constant
In[7]:=
InverseFourierTransform[ft,t,x,FourierOverallConstant->1/ 2 Pi] Out[7]=
\!\(InverseFourierTransform[E\^\(I\ t\ \[Mu] - \(t\^2\
\[Sigma]\^2\)\/2\), t,
    x, FourierOverallConstant \[Rule] \[Pi]\/2]\) Or if I manualy try
the integral
In[8]:=
1/2 Pi Integral[ft Exp[I t x],{t,-Infinity,Infinity}] Out[8]=
\!\(\*
  RowBox[{\(1\/2\), " ", "\[Pi]", " ",
    RowBox[{"Integral", "[",
      RowBox[{
      \(E\^\(I\ t\ x + I\ t\ \[Mu] - \(t\^2\ \[Sigma]\^2\)\/2\)\), ",",
        RowBox[{"{",
          RowBox[{"t", ",",
            InterpretationBox[\(-\[Infinity]\),
              DirectedInfinity[ -1]], ",",
            InterpretationBox["\[Infinity]",
              DirectedInfinity[ 1]]}], "}"}]}], "]"}]}]\) I even tried
to split the function in Even and Odd parts In[9]:=
\!\(f[x_] := E\^\(I\ x\ \[Mu] - \(x\^2\ \[Sigma]\^2\)\/2\); \n\n
  G[x_] := \ 1/2\ \((f[x] + f[\(-x\)])\)\n
  H[x_] := \ 1/2\ \((f[x] - f[\(-x\)])\)\) In[11]:=
\!\(\[Integral]\_\(-\[Infinity]\)\%\[Infinity] G[x] Cos[2\ Pi\ t\ x]
        \[DifferentialD]x\  -
    I\ \(\[Integral]\_\(-\[Infinity]\)\%\[Infinity] H[x] Sin[2\ Pi\ t\
x]
          \[DifferentialD]x\)\)
Out[11]=
\!\(\*
  RowBox[{
    RowBox[{\(-I\), " ",
      RowBox[{"If", "[",
        RowBox[{
        \(Im[2\ \[Pi]\ t - \[Mu]] == 0 && Im[2\ \[Pi]\ t + \[Mu]] == 0
&&
            Re[\[Sigma]\^2] > 0\), ",",
          \(\(I\ \((
                E\^\(-\(\((\(-2\)\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
                            \[Sigma]\^2\)\)\) -
                  E\^\(-\(\((2\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
                            \[Sigma]\^2\)\)\))\)\
                \ at \(\[Pi]\/2\)\)\/\ at \[Sigma]\^2\), ",",
          RowBox[{
            SubsuperscriptBox["\[Integral]",
              InterpretationBox[\(-\[Infinity]\),
                DirectedInfinity[ -1]],
              InterpretationBox["\[Infinity]",
                DirectedInfinity[ 1]]],
            \(\(1\/2\
                \((\(-E\^\(\(-I\)\ x\ \[Mu] - \(x\^2\
\[Sigma]\^2\)\/2\)\) +
                    E\^\(I\ x\ \[Mu] - \(x\^2\ \[Sigma]\^2\)\/2\))\)\
                Sin[2\ \[Pi]\ t\ x]\) \[DifferentialD]x\)}]}], "]"}]}],
"+",
    RowBox[{"If", "[",
      RowBox[{
      \(Im[2\ \[Pi]\ t - \[Mu]] == 0 && Im[2\ \[Pi]\ t + \[Mu]] == 0 &&
          Re[\[Sigma]\^2] > 0\), ",",
        \(\(\((E\^\(-\(\((\(-2\)\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
                            \[Sigma]\^2\)\)\) +
                  E\^\(-\(\((2\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
                            \[Sigma]\^2\)\)\))\)\
              \ at \(\[Pi]\/2\)\)\/\ at \[Sigma]\^2\), ",",
        RowBox[{
          SubsuperscriptBox["\[Integral]",
            InterpretationBox[\(-\[Infinity]\),
              DirectedInfinity[ -1]],
            InterpretationBox["\[Infinity]",
              DirectedInfinity[ 1]]],
          \(\(1\/2\
              \((E\^\(\(-I\)\ x\ \[Mu] - \(x\^2\ \[Sigma]\^2\)\/2\) +
                  E\^\(I\ x\ \[Mu] - \(x\^2\ \[Sigma]\^2\)\/2\))\)\
              Cos[2\ \[Pi]\ t\ x]\) \[DifferentialD]x\)}]}], "]"}]}]\)
Here I took what seemed to be the real part \!\(fs = \(\((
          E\^\(-\(\((\(-2\)\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
\[Sigma]\^2\)\)\) +
            E\^\(-\(\((2\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
\[Sigma]\^2\)\)\))\)\
        \ at \(\[Pi]\/2\)\)\/\ at \[Sigma]\^2\) Out[15]=
\!\(\(\((E\^\(-\(\((\(-2\)\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
\[Sigma]\^2\)\)\) +
          E\^\(-\(\((2\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
\[Sigma]\^2\)\)\))\)\
      \ at \(\[Pi]\/2\)\)\/\ at \[Sigma]\^2\) This is a simple verification
In[21]:=
fs/.{\[Mu]->0,\[Sigma]->1,t->0}
Out[21]=
\!\(\ at \(2\ \[Pi]\)\)
In[22]:=
PDF[NormalDistribution[\[Mu],\[Sigma]],t]/.{\[Mu]->0,\[Sigma]->1,t->0}
Out[22]=
\!\(1\/\ at \(2\ \[Pi]\)\)
And as you can see it doesn't come close In[23]:=
\!\(\[Integral]\_\(-\[Infinity]\)\%\[Infinity] fs \[DifferentialD]t\)
Out[23]=
\!\(\*
  RowBox[{"If", "[",
    RowBox[{
    \(Re[\[Mu]\/\[Sigma]\^2] > 0 && Re[\[Sigma]\^2] > 0\), ",", "1",
",",
      RowBox[{
        SubsuperscriptBox["\[Integral]",
          InterpretationBox[\(-\[Infinity]\),
            DirectedInfinity[ -1]],
          InterpretationBox["\[Infinity]",
            DirectedInfinity[ 1]]],
        \(\(\(\((E\^\(-\(\((\(-2\)\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
                              \[Sigma]\^2\)\)\) +
                    E\^\(-\(\((2\ \[Pi]\ t + \[Mu])\)\^2\/\(2\
                              \[Sigma]\^2\)\)\))\)\
                \ at \(\[Pi]\/2\)\)\/\ at \[Sigma]\^2\)
\[DifferentialD]t\)}]}],
    "]"}]\)
I ploted fs and it's not even close but it looks Gaussian In[28]:=
Plot[fs/.{\[Mu]->0,\[Sigma]->1},{t,-3,3},PlotRange->All] My question is
can someone tell me what I'm doing wrong ? The actual characteristic
function I'd like to find the PDF for goes like this
 and I can't find it as well.
\!\(Exp[\(c\^\[Alpha]\/Cos[\(\[Pi]\ \[Alpha]\)\/2]\)
      \((\(\((t\^2 + \[Lambda]\^2)\)\^\(\[Alpha]\/2\)\)
            Cos[\[Alpha]\ ArcTan[t\/\[Lambda]]] -
\[Lambda]\^\[Alpha])\)]\) \[Alpha]\[NotEqual]1
c, \[Lambda] and \[Alpha] are real constant
----------------------------------------------------------------------------
----------------------------------------------------------

Hope someone can help

Thanks,

Yves Gauvreau



  • Prev by Date: Re: Simplify last version
  • Next by Date: strange graphics behavior
  • Previous by thread: Re: Simplify last version
  • Next by thread: strange graphics behavior