However, the signal does move from minus 1 to plus 1, so its energy, or its power,
must be non-zero.
If you remember the definition of energy and
power of a signal from module 2.1, we can readily see that the energy is infinite.
Because the limit for N that goes to infinity of the sum
from -N to n of the values of the sequence squared.
A simple 2N plus one, because each value squared will be equal to one.
And so as N goes to infinity, this will diverge.
However, the signal does have finite power over any interval.
We take the energy over a minus Into an interval, and
we normalize that by the length of the interval.
And we find out that the power is actually 1, regardless of the interval's length.
Let's try the following strategy.
Let's try to average the DFT's square magnitude, normalized.
So we pick an interval N, we pick a number of iteration,
so a number of times we will repeat the experiment.
We run the signal generator n times, and we obtain n, m points realizations.
We compute the DFT of each realization, and
we average their square magnitude divided by the length of the interval.
So if we do that, of course, the first DFT will be this random pattern that we have
seen before, but as we increase the number of realizations,
we seem that the points seem to convert to something.
And indeed by the time M hits 5000, we see that the average
of the squared magnitude of the DFT seems to converge to the constant 1.
So have defined a quantity here P of k, which is the expected value of the squared
magnitude of the kth bin of the DFT over N points divided by capital N.
And it looks very much as if P of k, this expectation, is equal to 1 for all ks.
So if the square magnitude of the DFT tends to the energy
distribution in frequency of a signal, then the normalized square magnitude of
the DFT tends to the power distribution, or the power density in frequency.
So what we have just derived is a new frequency representation for
signals that have infinite energy, the finite power,
and it is called the power spectral density.
Let's try to develop some intuition about the power spectral density
of the coin toss signal.
The fact that it is constant means that the power
is equally distributed over all frequencies.
In other words we cannot predict if the signal will move slowly or super-fast.
We cannot predict that because each sample is independent of each other.
So we could actually have a realization where, just by luck,
we have a constant signal because all coin tosses are heads or we could have
a realization in which at each coin toss we have a different outcome.
And so the signal will oscillate at the maximum digital frequency.
The power spectral Embodies this behavior
by distributing the probability of power over the entire frequency access.