How to calculate theta power for EEG data and run statistics

Hello, I am trying to calculate theta power for 14 subjects data for 2 conditions and want to see if the 2 conditions are significantly different. The data is already preprocessed and baseline corrected. It’s in .mat format, and structured as channels x time x trials. I can calculate the power, but how can I do a paired t-test?

This does not look like a file produced by Brainstorm.
Are you doing all the pre-processing in Brainstorm?

This is described in the Statistics tutorial:

However, the inputs need to be be Brainstorm PSD files (one for each trial) that contain the power for frequency bands (only theta in your case).

Also note that a more standard analysis is to test the magnitude (ie. sqrt(power))

The data was preprocessed in matlab, I believe, done by a previous lab member. I didn’t get the raw data, I just got the epochs for different conditions. So, I suppose from what you’re suggesting is that I'd need to convert the individual trials to Brainstorm PSD files.

That is correct. An easy way to do so would be:

  1. Concatenate all the trials in a variable X, and save that X in a .mat file
  2. Review the concatenated file as raw file, using the format EEG: Matlab matrix
  3. Import the epochs/trials by splitting using the original duration of the trial

Then you would compute the PSD (in bands) for your trials, and compute the statistical test

Thank you, I’ll try that approach.