Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mean and Standard Deviation of the entire matrix 1

Status
Not open for further replies.

cheenybaba

Bioengineer
Jun 18, 2007
2
Hi,

I work with MEG data for neurocognitive studies.
I am trying to convert my fft power values into zscores (to standardize them across participants). I have collected data for three conditions for each of my participant.
I have two questions:
1. Should I convert my power values into z scores for the entire data before separating the data based on conditions? OR should I convert the power values to z scores for each of my conditions separately?

I am leaning towards the former method of conversion to z scores but am still not sure if thats the right method. can someone who knows help please??

2. And that leads to the second question of how to convert my values across the entire matrix! For each of my participant, the size of the matrix is: 550x248 (where 550 are the number of sample points and 248 are the number of channels across which each of the sample points are generated). I know mean(X) computes the mean across columns. Can someone help me in figuring out whether
mean(mean(X)) calculates the means across the entire matrix (i.e. population, in my case)?

If so, does the same logic apply to standard deviation? (i.e. std(X) calculates standard deviation for each of the columns in the matrix while std(std(X)) calculates it for the entire matrix? When I do std(std(X)), the answer is always zero.


I am attaching the script that was meant to convert my scores to zscores. but matlab doesnt like it. Can someone help me figure out why?

function Y=standardize(X)
mu=mean(mean(X))
s=std(std(X))
x=X-mu
z=x./s
end

Huge Thanks!
Cheenybaba
 
Replies continue below

Recommended for you



1. The purpose of z-scores is to allow the comparison of data from different statistical distributions. What you need to do first is quantitatively determine which data are sampled from different distributions. I don't have MEG experience, but I suspect that data from each condition and each sample point are differently distributed. A simple histogram should be sufficient to make this determination.

Therefore, you want to calculate z-scores independently for each condition and sample point.

2.
mean(mean(x)) is the same as mean:)). Both are fine.
std(std(x)) is the standard deviation of the standard deviations of each column, which is wrong. Use std(x:))).

CV
 

Thanks Cev for the message. I will try mean:)) and std:)) to see if it gives me the values across the entire matrix.

I have got one more question. In fact, its not really a question but I just want some opinion on the mathematical side of my data analysis.

I am converting my power values (that I have computed using the fft) into Z-scores. But I am thinking that the actual MEG data is in the time domain (magnetic fields across time). Do you think it makes more sense to convert into z -scores in the time domain? The reason why I am worried about this is because fourier transform computes real and complex numbers and I wonder if z-score conversion on complex numbers is a rather naive approach. Does it even make sense mathematically?

I have the option of converting the magnetic fields (that are in the time domain) into z-scores before computing fft on the z-scores.

What do you think? Any suggestions/points to consider will be highly recommended.
Cheenybaba
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor