# Parseval's Theorem for Time Domain Data with DC

I have read several times that the variance for time domain data with a zero mean is equal to the integral of the power spectral density divided by N.

From wikipedia, the discrete form of Parseval's theorem is:

To my eye, the term on the left can only be called the variance of the time domain data if that data has a mean of zero. However, as I follow derivations of Parseval's theorem (poorly), I don't see any indication that the mean value of the time domain needs to be zero for the theorem to be applicable. Can anyone knowledgeable confirm this?

Thanks!

As stated, yes, the variance of zero-mean data can be found by Parseval's theorem.

But that's because the sum of the squares of any data can be found by Parseval's theorem.

So you are correct: Parseval's theorem isn't limited to zero-mean data. I suspect that you were looking in texts about audio or RF, where signals typically are zero mean. In the more general case, signals aren't zero mean, and Parseval's theorem still holds.

(It will be good for you, if you can plow through the math, to prove Parseval's theorem for yourself. Because (a) it's good practice for other DSP math; (b) if you work through the math you'll remember it forever, and (c) that which does not kill us makes us strong.)

This is actually a fun little proof. Let's assume $$x[n]$$ is mean-free and we create biased signal as

$$y[n] = x[n]+a$$

Taking the Fourier Transforms and looking at the DC part we get $$X[0] = 0$$ (since it's mean free) and $$Y[0] = Na$$. For all other frequencies we get $$Y[k] = X[k], k\neq 0$$

Let's sum the squares in the time domain:

$$\sum y[k]^2 = \sum x[n]^2 + 2a\sum x[n] + \sum a^2 = \sum x[n]^2 + Na^2$$

The middle term drops out since $$x[n]$$ is mean free and hence $$\sum x[n] = 0$$.

And in the frequency domain $$\frac{1}{N} \sum Y[k]^2 = \frac{1}{N} \left [ \sum X[k]^2 + (Na).^2 \right ] = \frac{1}{N} \sum X[k]^2 + Na^2$$

So by adding a bias we add $$Na^2$$ to both the frequency domain and the time domain energy.

• Why do you drop the middle term, 2a*sum(x[n]) in the middle set of expressions ? Jul 28 at 15:05
• @FooAnon: Hilmar will clarify ( given my experience ) but I think he's actually taking expectations implicitly but just didn't include them in the derivation. Note that the variance of a mean zero random variable, $x$, is E($x^2$). So, the first and third term sums remain but $E(x[n]) = 0$ so the middle term sum drops out. Jul 28 at 15:28
• What Mark said :-). I'll update it Jul 28 at 21:21