The conventional signal power calculation can be:
$$ P(n) = \frac{1}{N}\sum_{i=0}^{N-1}x^2(n-i) $$
$x(n)$ is the signal. However, I have seen another method:
$$ P(n) = \lambda P(n-1) + (1-\lambda) x^2(n) $$ Here, $\lambda$ is the forgetting factor. So what is the difference between these two methods? Which one is widely used in real-time process? Which one is more computationally efficient?