How to compute bernoulli distribution PDF from CF

The characteristic function for a Bernoulli distribution is

$$\phi(t) = (q+pe^{it}) \text{ where } p+q=1$$

I also know that the relationship between $\phi(t)$ and the pdf $f(k)$ is the Fourier Transform

$$f(k) = \frac{1}{2\pi}\int\limits_{-\infty}^{\infty}e^{-itk}(q+pe^{it})dt$$

However I do not see how to evaluate this integral to arrive at the expected pdf

$$f(k) = \begin{cases} p & k=1 \\ q & k=0 \end{cases}$$

as far as I got was

$$f(k) = \frac{1}{2\pi}\lim\limits_{T \rightarrow \infty}\int\limits_{-T}^{T}e^{-itk}(q+pe^{it})dt = \frac{-i}{\pi}\lim\limits_{T \rightarrow \infty}[q\sin(Tk) + p\sin(T(1-k))]$$

So if $k=0$ then the first term vanishes and the second term is undefined. Vice versa for $k=1$. And for $k \notin \{0,1\}$ both terms are undefined (although this last part is okay I think)

• The Bernoulli distribution does not have a PDF: you are confusing the PDF with the probability function. If you want to approach the problem this way, you must think of the probability function as being a linear combination of the generalized functions $\delta_0$ and $\delta_1$.
– whuber
Dec 17, 2016 at 21:41

I think the identity you're using for this problem isn't ideal. If $X$ is integer-valued, then there's another easier identity you can use: $$P(X=k) = \dfrac 1 {2\pi} \int\limits_{-\pi}^{\pi} e^{ikt} \phi_X(t) dt$$ Evaluating this integral leaves you with $$\dfrac {(2 k p - k + 1 - p) \sin(π k)} {π (1-k) k}$$
Now, you can't directly substitute $0$ or $1$ for $k$. Instead, you'll have to take the limit as $k$ approaches these values. If you do that, you end up with the correct limits of $p$ and $1-p$.