×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Mean and Standard Deviation of the entire matrix

Mean and Standard Deviation of the entire matrix

Mean and Standard Deviation of the entire matrix

(OP)
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

RE: Mean and Standard Deviation of the entire matrix



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

RE: Mean and Standard Deviation of the entire matrix

(OP)

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources