<p>How you analyse your data depends a bit on how you did your time-frequency decomposition.</p>

<p>If you're using a fast Fourier transform, you will likely cut out the temporal window of interest prior to analysis, and your power estimate will be a single value (per subject and/or condition) within this time window. For example, alpha wave desynchronisation is likely to kick in something like 100 ms after the onset of a tone, and you might be interested in its power between then and 300 ms. This is based on theory and literature, there is no single answer. But if you do cut out a time window in advance like this, make sure that the time window of interest is an exact multiple of the size of the cycle you are looking at! (e.g. a multiple of 1/10th of a second for 10 Hz.) Otherwise you might get some nasty artifacts.</p>

<p>What you will then end up with is one data point per subject and condition, per EEG sensor. Some people pre-select a group of sensors based on the literature, and look at average power across these sensors. In that case you can use any of the standard parametric statistics to test your hypotheses.</p>

<p>Alternatively, you might adopt a sliding time window or similar approach (<a href="http://www.fieldtriptoolbox.org/tutorial/timefrequencyanalysis" rel="nofollow">see here</a>), where you get an estimation of how power develops over time (per sensor and frequency band). In that case your data space is larger, and the usual way to constrain it is to use <a href="http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq" rel="nofollow">cluster-based permutation tests</a> which are <a href="http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics" rel="nofollow">nonparametric</a>. This will give you back clusters of significant differences across time and/or sensors (this means groups of successive time points or sensors near each other that show an experimental effect). Again, whether you want to average across sensors is a theoretical question. You can also decide to average across time using this approach, and to end up with a single data point per subject/condition as above. This approach is not particularly temporally precise - the data will be a bit smeared across time - but it gives you a better overview of what is going on in the brain and in which frequency bands the interesting effects might lie.</p>

<p>As for the unit, I prefer to convert raw power to decibel, because the scale is symmetric around zero and comparable across experiments. So, 10*log10 of the power in your signal. If you're using a baseline, make it an absolute baseline (it's equivalent to a relative baseline for raw power, which is the standard).</p>

CC BY-SA 3.0
2016-09-14T12:15:26.233Z
2016-09-14T12:15:26.233Z
Ana
<p>To do this in EEGLAB, you are going to want to read this: sccn.ucsd.edu/wiki/Chapter_11:_Timefrequency_decomposition. Your "level of activity" in a given frequency band is the magnitude of the frequency representation in that frequency band at a given point in time.</p>

<p>Really, though, EEGLAB is very heavily geared towards ICA analysis of whole brain activity, not of frequency analysis of single electrodes.  If you want to do single electrode frequency analysis in Matlab, I would suggest using chronux (<a href="http://chronux.org" rel="nofollow">http://chronux.org</a>): functions such as mtspectrumc will give you the frequency spectrum and then you can just take the magnitude of the spectrum in your preferred frequency band as your "level of activity" of that frequency band.  See <a href="http://chronux.org/chronuxFiles/filesReleases/manual.pdf" rel="nofollow">http://chronux.org/chronuxFiles/filesReleases/manual.pdf</a> Section 2.2.1</p>

CC BY-SA 3.0
2016-08-14T22:30:05.757Z
2016-08-14T22:30:05.757Z
honi
<p>This may be more of a signal processing question but I'm looking to measure and compare activity in different frequency bands for each sensor. Unfortunately, all papers I've looked at simply refer to "alpha activity" without specifying how this was calculated. </p>

<p>Is there any standard method or "best practice" to measure the level of activity? Is it simply the average energy in the band (sum of the square of the absolute of the signal?) </p>

<p>Any help with this would be appreciated.</p>

CC BY-SA 3.0
2016-08-12T20:15:44.943Z
what papers have you looked at?
honi
CC BY-SA 3.0
2016-08-12T20:31:38.330Z
It's really nicely explained here: http://cogsci.stackexchange.com/a/15224/11318 . it is called a fast Fourier transform. You can also use a wavelet convolution if you want to calculate changes over time.
Robin Kramer-ten Have
CC BY-SA 3.0
2016-08-12T21:12:38.000Z
@honi I've looked at a few different studies in relation to emotion and music, namely:
http://linkinghub.elsevier.com/retrieve/pii/S030439401400367X
http://link.springer.com/10.1007/978-3-642-35139-6\_17
GroomedGorilla
CC BY-SA 3.0
2016-08-12T21:14:31.093Z
@RobinKramer Thanks for pointing me in the right direction. I'm familiar with FFTs (although admittedly I've only started applying them in my work recently). From what I know, FFTs are used to get a frequency domain of a signal. To be a bit more specific, my question is:
Once I've picked out the frequency data (e.g. filtered for the alpha band), how do I go about measuring "activity" in that frequency band, to then compare it to alpha activity from a different source or to beta activity?
GroomedGorilla
CC BY-SA 3.0
2016-08-12T21:22:27.213Z
are you using any eeg analysis toolboxes?  if so, check out their tutorials.  if not, you should be.  http://cogsci.stackexchange.com/questions/3216/what-computerized-eeg-analysis-algorithms-are-there/3462#3462
honi
CC BY-SA 3.0
2016-08-12T21:31:00.430Z
but in any case, the answer is that you are looking at the magnitude of the FFT in your frequency range.
honi
CC BY-SA 3.0
2016-08-12T23:34:25.870Z
I'm using the EEGLAB toolkit. Although there are various functions to use and great ways of manipulating the data, I couldn't find any mention of the correct way to do this.

Thanks for the clarification
GroomedGorilla
CC BY-SA 3.0
2016-08-14T22:23:09.973Z
you are going to want to read this: https://sccn.ucsd.edu/wiki/Chapter_11:_Timefrequency_decomposition.  Your "level of activity" in a given frequency band is the magnitude of the frequency representation in that frequency band at a given point in time..
honi
<eeg><signal-processing>
Method/Unit for measuring activity in specific frequency band for EEG
GroomedGorilla
# Method/Unit for measuring activity in specific frequency band for EEG

(Asked by: username_0 on 2016-08-12)

This may be more of a signal processing question but I'm looking to measure and compare activity in different frequency bands for each sensor. Unfortunately, all papers I've looked at simply refer to "alpha activity" without specifying how this was calculated.

Is there any standard method or "best practice" to measure the level of activity? Is it simply the average energy in the band (sum of the square of the absolute of the signal?)

Any help with this would be appreciated.

**Tags:** eeg, signal-processing

> **Comments:**
> **username_1**: what papers have you looked at?  
> **username_2**: It's really nicely explained here: http://cogsci.stackexchange.com/a/15224/11318 . it is called a fast Fourier transform. You can also use a wavelet convolution if you want to calculate changes over time.  
> **username_0**: @username_1 I've looked at a few different studies in relation to emotion and music, namely: http://linkinghub.elsevier.com/retrieve/pii/S030439401400367X http://link.springer.com/10.1007/978-3-642-35139-6\_17  
> **username_0**: @RobinKramer Thanks for pointing me in the right direction. I'm familiar with FFTs (although admittedly I've only started applying them in my work recently). From what I know, FFTs are used to get a frequency domain of a signal. To be a bit more specific, my question is: Once I've picked out the frequency data (e.g. filtered for the alpha band), how do I go about measuring "activity" in that frequency band, to then compare it to alpha activity from a different source or to beta activity?  
> **username_1**: are you using any eeg analysis toolboxes?  if so, check out their tutorials.  if not, you should be.  http://cogsci.stackexchange.com/questions/3216/what-computerized-eeg-analysis-algorithms-are-there/3462#3462  
> **username_1**: but in any case, the answer is that you are looking at the magnitude of the FFT in your frequency range.  
> **username_0**: I'm using the EEGLAB toolkit. Although there are various functions to use and great ways of manipulating the data, I couldn't find any mention of the correct way to do this.  Thanks for the clarification  
> **username_1**: you are going to want to read this: https://sccn.ucsd.edu/wiki/Chapter_11:_Timefrequency_decomposition.  Your "level of activity" in a given frequency band is the magnitude of the frequency representation in that frequency band at a given point in time..  

---

## 2 answers

### Answer by username_3 on 2016-09-14. Score: 2

How you analyse your data depends a bit on how you did your time-frequency decomposition.

If you're using a fast Fourier transform, you will likely cut out the temporal window of interest prior to analysis, and your power estimate will be a single value (per subject and/or condition) within this time window. For example, alpha wave desynchronisation is likely to kick in something like 100 ms after the onset of a tone, and you might be interested in its power between then and 300 ms. This is based on theory and literature, there is no single answer. But if you do cut out a time window in advance like this, make sure that the time window of interest is an exact multiple of the size of the cycle you are looking at! (e.g. a multiple of 1/10th of a second for 10 Hz.) Otherwise you might get some nasty artifacts.

What you will then end up with is one data point per subject and condition, per EEG sensor. Some people pre-select a group of sensors based on the literature, and look at average power across these sensors. In that case you can use any of the standard parametric statistics to test your hypotheses.

Alternatively, you might adopt a sliding time window or similar approach ([see here](http://www.fieldtriptoolbox.org/tutorial/timefrequencyanalysis)), where you get an estimation of how power develops over time (per sensor and frequency band). In that case your data space is larger, and the usual way to constrain it is to use [cluster-based permutation tests](http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq) which are [nonparametric](http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics). This will give you back clusters of significant differences across time and/or sensors (this means groups of successive time points or sensors near each other that show an experimental effect). Again, whether you want to average across sensors is a theoretical question. You can also decide to average across time using this approach, and to end up with a single data point per subject/condition as above. This approach is not particularly temporally precise - the data will be a bit smeared across time - but it gives you a better overview of what is going on in the brain and in which frequency bands the interesting effects might lie.

As for the unit, I prefer to convert raw power to decibel, because the scale is symmetric around zero and comparable across experiments. So, 10\*log10 of the power in your signal. If you're using a baseline, make it an absolute baseline (it's equivalent to a relative baseline for raw power, which is the standard).


---

### Answer by username_1 on 2016-08-14. Score: 0

To do this in EEGLAB, you are going to want to read this: sccn.ucsd.edu/wiki/Chapter\_11:\_Timefrequency\_decomposition. Your "level of activity" in a given frequency band is the magnitude of the frequency representation in that frequency band at a given point in time.

Really, though, EEGLAB is very heavily geared towards ICA analysis of whole brain activity, not of frequency analysis of single electrodes. If you want to do single electrode frequency analysis in Matlab, I would suggest using chronux (<http://chronux.org>): functions such as mtspectrumc will give you the frequency spectrum and then you can just take the magnitude of the spectrum in your preferred frequency band as your "level of activity" of that frequency band. See <http://chronux.org/chronuxFiles/filesReleases/manual.pdf> Section 2.2.1


---

