Re: [R] fft: characteristic function to distribution

From: Thomas Steiner <>
Date: Wed, 07 May 2008 15:19:02 +0200

Thank you Prof Ripley for your answer.

> > The characteristic function is the inverse Fourier transform of the
> > distribution function. The characteristic function of a normaly
> > distributed random variable is exp(-t^2/2).
> >
> The fft is a discrete Fourier transforn, not a continuous one.

This is correct. I try to approximate the continous normal distribution with infinite support by a set of discrete and bounded points. A real discrete baby example would be the bernoulli distribution:

plot(t,cdf(t),type="l",col="red",ylim=range(cdf(t),Re(fft(char)[2:99]))) lines(t,fft(char),col="blue")

This is more or less like the normal example.

> Further in each case where the normalizing constants are placed and the
> units of frequecy differ from source to source.
> ?fft has references to exactly what it computes: please consult them.

I read the documentation/help page. More details there would be helpful. For example an example (it says "example*s*") something where explicit expressions are known (as I tried it here). Another possible improvement could be to make for example the following sentence nicer/clearer: "(the inverse has a + in the exponent of e, but here, we do not divide by 1/length(x))." I did not consult the two given references (two old but surely valuable books).

Enough prattled. Can you give a working example where the cummulative distribution function and the fourier transform are explicitly known?

I cannot add any value neither to wonderful R nor to this helpful function. But perhaps my question isn't that stupid and you can give a hint to proceed. Thank you very much in advance, Thomas mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 07 May 2008 - 13:23:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 07 May 2008 - 13:30:34 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive