For example, I have power spectrum density calculated by pwelch

f = EEG.data;
f = f(2, :);
N = EEG.pnts;
Fs = EEG.srate;
NFFT = 2^nextpow2(N);
WINDOW = 512;
[spectra, freqs] = pwelch(x, WINDOW, NOVERLAP, NFFT,Fs);
deltaIdx = find(freqs>1 & freqs<4);
deltaPower = mean(spectra(deltaIdx));

The code comes from EEGLab, and can be found here: https://sccn.ucsd.edu/pipermail/eeglablist/2014/008043.html

How should I calculate absolute power from it? What's the relationship between absolute power and power spectrum density?

  • $\begingroup$ @RobinKramer? seems like a good excuse for an exposition of power spectra $\endgroup$
    – honi
    Commented Apr 20, 2017 at 3:33
  • $\begingroup$ It seems so indeed. @Frederica, could you provide a little more context to your question. Where does that piece of code come from, and is there a reason you chose pwelch over FFT? $\endgroup$ Commented Apr 20, 2017 at 6:45
  • $\begingroup$ @RobinKramer I've updated my code and resources in my question. From what I know, pwelch returns power spectra density with unit W/HZ. How does the mean of it gives absolute power with unit W? $\endgroup$
    – Frederica
    Commented Apr 20, 2017 at 18:27

2 Answers 2


I had to do some searching to be able to answer this question. As a matter of fact, a similar questions was once asked on Signal Processing.

To make the explanation more laymen-like, I think the answer means the following:

With pwelch or an FFT analysis you can calculate the amplitude of sinusoids with particular frequencies (see this answer ). These amplitudes squared, result in the absolute power within these specific frequencies. The resulting power per frequency is the power spectral density (PSD). In neuroscience, people do not often work with individual frequencies but work with frequency bands, such as the alpha band (8-14 Hz). This can be calculated by taking the average or the integral.

The absolute power (W), you referred to, is the power of the entire signal. It thus does not make a distinction between the different frequencies. This can be calculated, by summing the power of each frequency (i.e. taking the integral of the signal). By summing, you have the total amount of power within the signal. The absolute power can be used to normalize the PSD, by dividing the PSD by the absolute power (as described in the answer on Signal Processing).

Average vs integral

It seems that it is possible to calculate either the average or the integral of a frequency band. But when would you take the integral and when would you take the average? The average is an easy way of calculating how high the power is in a specific frequency band. This way, it does not matter how large the range of a frequency band is. The alpha band average will not be more inflated then the delta band (0-4 Hz) because of a bigger range.

When you take the integral there will exist differences that are affected by the size of the frequency band, because you do not divide the sum by the amount of samples (i.e frequencies). However, it does allow you to normalize the PSD with the absolute power. Say, the integral of the alpha band results in 2W, the integral of the delta band results in 1W, and the absolute power of the entire spectrum equals 10W. Then we know that the alpha band plays a 20% part and the delta band a 10% part in the total signal. With mere averaging, this would not be possible because we 'neglect' the size of the range.

I think it depends on what exactly you are after. I haven't work with the absolute power and am not familiar with it's user. Perhaps it has something to do with comparisons between exp. conditions (within frequency-bands, i.e. alpha vs alpha) or within exp. conditions (between frequency bands). If an actual expert could elaborate on why one method is beneficial over the other, that would be great.

  • $\begingroup$ Thanks for your explanation. I'm still a little bit confused about the calculation of band power. From the answer on Signal Processing, the absolute band power is calculated by summing the power over the frequency band. Why it's calculated by taking the average in neuroscience? $\endgroup$
    – Frederica
    Commented Apr 24, 2017 at 15:33
  • $\begingroup$ That is a good question. I looked into it and found that there actually is not a real difference between integrating and averaging. Where integrating is simply summing all the values, with averaging you sum all the values and divide it by the amount of values. I'll try to rephrase my answer a bit. $\endgroup$ Commented Apr 25, 2017 at 12:36

I found this article very helpful https://raphaelvallat.com/bandpower.html, there are some good graphs for visual.

I am trying to learn this content myself, but my understanding is that pwelch outputs power density [units^2/Hz] then you can calculate an area under that power density plot (integrate) to get just power [units^2] aka absolute power.
(area = PSD[units^2/Hz]*Freq[Hz] = Power[units^2]).
For example, integrate from 1-4Hz to get delta power. (there is a visual of this in the link above).

The last line of your code (deltaPower = mean(spectra(deltaIdx));) calculates the average of the power spectral densities within the defined range.

I believe when people say "band power" they are referring to the absolute power (integral of the PSD) across one of the bands (delta, theta, etc). I'm not sure if the PSD alone is commonly used with EEG, but I can't say.

Alternatively, pwelch has an input option spectrumtype='power' and it should output straight to power instead of PSD. (haven't tried it yet). Then I imagine you just sum the powers within your desired range.

Alternatively alternatively, you could also just do fft()^2 to get [units^2] which is power. I'm not sure the difference between that vs integrating a PSD. Just offering up ideas. Would also like an expert input!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.