Consider a stationary random process $x(n)$ with $n = 0, \pm 1, \pm 2,..$
The Autocorrelation function is defined as: $$R_{xx}(m) := \mathbb{E}[x^*(n)x(n+m)]$$ where the * denotes conjugation.
I want to prove the equivalence of the following 2 definitions of the power spectrum.
- Usual Definition $$P_{xx}(f) := \sum_{k = -\infty}^{\infty}R_{xx}(k)e^{-j2\pi f k} = Y_1(f)$$
- Alternative Definition $$P_{xx}(f) := \mathbb{E}[X(f) X^*(f)] = Y_2(f)$$ where $X(f) = \sum_{k = -\infty}^{\infty}x(k)e^{-j2\pi f k}$
So I started out as follows: \begin{align} X(f)X^*(f) &= \sum_{k = -\infty}^{\infty}x(k)e^{-j2\pi f k}\sum_{n = -\infty}^{\infty}x^*(n)e^{j2\pi f n}\\ &= \sum_{n = -\infty}^{\infty}\sum_{k = -\infty}^{\infty}x(k)x^*(n)e^{-j2\pi f (k-n)} \end{align} Then by setting $k-n = m$ we have: \begin{align} X(f)X^*(f) &=\sum_{n = -\infty}^{\infty}\sum_{m = -\infty}^{\infty}x^*(n)x(n+m)e^{-j2\pi f m} \end{align} Thus, if it is possible to interchange the expectation with the double sum it follows: \begin{align} Y_2(f) &= \sum_{n = -\infty}^{\infty}\sum_{m = -\infty}^{\infty}R_{xx}(m)e^{-j2\pi f m}\\ &=\sum_{n = -\infty}^{\infty}Y_1(f) \end{align}
So it seems I have messed up the proof somewhere or the second definition is problematic. I suspect the former. Any help is appreciated.