# How to compute the energy of a NON-STATIONARY (transient) random discrete-time signal

When computing the energy of a NON-STATIONARY (transient) random discrete-time signal $$x(n)$$, does it make more sense to compute the energy as

$$E=\sum_1^N{x^2(n)}$$ over all the $$N$$ samples

or does it make more sense to compute the energy as the sum of the auto-correlation function values $$R_{xx}(k) = \sum_n {x(n+k) \, x(n)}$$ , which should be

$$E = \sum_k R_{xx}(k)$$ ?