# understanding Fourier transform results for probability distribution

I think I do not understand Fourier transform results properly. I am trying to improve my understanding. It would be very kind if someone can help by commenting/answering.

This is the following algorithm:

1> select [a,b] in X

2> compute grid points in [a,b] in X

3> compute frequency interval [f1, f2]

4> compute the grid in frequency interval [f1, f2]

5> compute pdf normal distribution for the points in step 2 i.e. compute $\frac{1}{\sqrt{2\pi}}e^{-x^2/2}$

6> now compute fft of the result in step 5 and plot the result.

This is matlab code for the process above:

N=100;
j=0:(N-1);
a=-5;
b=5;
dx = (b-a)/N;
x = a+j*dx;
dt = 2*pi/(N*dx);
f1 = -N/2*dt;
f2 = N/2*dt;
t= f1+ j*dt;
GX =  normpdf(x,0,1);
fft_GX = real(fft(GX))';


When I plot fft_GX I do not get what I was expecting.

I was expecting the fft result of have a function form of $e^{-t^2/2}$.

• Should dt really be of order 1 (i.e. not some negative power of $N$ like dx is)? At any rate, did you notice that the rest of the code didn't use any of this stuff about $t$ at all? Your plot is just the DFT of the normal PDF on $[a,b]$. – Ian Aug 8 '17 at 17:50
• that information about "t" was just for completeness. because once I have the vector fft_GX I will plot in against the "t" vector. but the shape of fft_GX is so off that it doesn't matter whether I plot it against the vector "t" or not. – user1612986 Aug 8 '17 at 19:43
• for further clarification. I was expecting the fft vector results to have a functional form $e^{t^2/2}$ but what I get looks nothing like the expected functional form. That is the part I am trying to clarify. – user1612986 Aug 8 '17 at 20:34
• The DFT (whose implementation is with the FFT algorithm) of $x(n),n \in 0 \ldots N-1$ is $X(k) = \sum_{n=0}^{N-1} x(n) e^{-2i \pi nk/N}$. Do you see how it relates to $\hat{f}(\xi)=\int_{-\infty}^\infty f(t) e^{-2i \pi \xi t}dt$ ? – reuns Aug 9 '17 at 9:24