Calculating total power for the signal In my previous question I asked about calculating a single number as &quot;Spectral Density&quot; feature from signal data. We concluded that it is really a total power and article (link) authors wrote the wrong feature name.
I have a signal with 1 measurement per minute for a few days. It looks like this (in time domain obviously):
,timestamp,activity
0,2003-05-07 12:00:00,0
1,2003-05-07 12:01:00,143
2,2003-05-07 12:02:00,0
3,2003-05-07 12:03:00,20
4,2003-05-07 12:04:00,166

I can assume the noise is white and also other assumptions simplifying the calculations if needed (authors weren't exactly advanced in signal processing, they only used very simple features).
Questions:

How can I calculate the total power? It is &quot;the variance plus the mean squared&quot;, so I should just calculate $(\sum_{i}^N x[i]) / N$ for the signal of length $N$? Or just sum the PSD (like in this link)?

Should I perform this calculation in the time domain (just time series like above), or should I calculate FFT and PSD (Power Spectral Density) first and calculate on PSD (which is also just an array of numbers, if I understand correctly)?

I have seen quite a few formulas for the total power. For finite number of samples and discrete measurements I have seen $(\sum_{i}^N x[i])$ divided by $N$, $N+1$, $2N$ or $2N+1$. Which one should I use? Does it have something to do with bias/unbiased sampling, i.e. in statistics we add +1 to the divisor to get unbiased calculations?


EDIT: above there should be $x^2[n]$ instead of $x[n]$
How can I calculate the total power? It is &quot;the variance plus the mean squared&quot;, so I should just calculate $(\sum_{i}^N x[i]) / N$ for the signal of length $N$?

$(\sum_{i}^N x[i]\color{red}{^2}) / N$ is the average power, not the total energy. Just the sum $\sum_{i}^N x[i]\color{red}{^2}$ is what you're looking for.

Or just sum the PSD (like in this link)?

and

Should I perform this calculation in the time domain (just time series like above), or should I calculate FFT and PSD (Power Spectral Density) first and calculate on PSD (which is also just an array of numbers, if I understand correctly)?

The sum of the power in time domain (as above) and in frequency domain are the same, so that's just another way to compute the same (probably just more labor-intense).

I have seen quite a few formulas for the total power. For finite number of samples and discrete measurements I have seen (∑Nix[i]) divided by N, N+1, 2N or 2N+1. Which one should I use? Does it have something to do with bias/unbiased sampling, i.e. in statistics we add +1 to the divisor to get unbiased calculations?

Since you're really not looking for the power but the energy, neither. You don't have to divide at all.