Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
asymmetric correlation matrix?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Benedikt F  
View profile  
 More options Feb 13, 12:26 pm
Newsgroups: comp.soft-sys.matlab
From: "Benedikt F" <benedikt.fu...@meduniwien.ac.at>
Date: Mon, 13 Feb 2012 17:26:10 +0000 (UTC)
Local: Mon, Feb 13 2012 12:26 pm
Subject: asymmetric correlation matrix?
Hi everyone,
I tried the following code and was surprised by the result:

Ts = randn(200,1000);  %random data
Rtest = corrcoef(Ts);      %get correlation matrix of these
isequal(Rtest,Rtest.')     %check correlation matrix for symmetry
-> ans = 0

The asymmetry is about the rounding error, but where does it come from? If each symmetric value is computed once and then assigned twice, this should't happen.
When I use my real data instead of random, the correlation matrix is completely symmetric.

I'm using R2011b 32-bit on Ubuntu.

Benedikt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dpb  
View profile  
 More options Feb 13, 5:11 pm
Newsgroups: comp.soft-sys.matlab
From: dpb <n...@non.net>
Date: Mon, 13 Feb 2012 16:11:46 -0600
Local: Mon, Feb 13 2012 5:11 pm
Subject: Re: asymmetric correlation matrix?
On 2/13/2012 11:26 AM, Benedikt F wrote:
> Hi everyone,
> I tried the following code and was surprised by the result:

> Ts = randn(200,1000); %random data
> Rtest = corrcoef(Ts); %get correlation matrix of these
> isequal(Rtest,Rtest.') %check correlation matrix for symmetry
> -> ans = 0

> The asymmetry is about the rounding error, but where does it come from?
> If each symmetric value is computed once and then assigned twice, this
> should't happen.

...

Well, that would seem to indicate that it wasn't just computed once,
doesn't it?  Order can make a difference in floating point; a lsb error
isn't a flaw under IEEE afaik that you can expect such to not occur on
occasion.

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt J  
View profile  
 More options Feb 14, 10:04 am
Newsgroups: comp.soft-sys.matlab
From: "Matt J " <mattjacREM...@THISieee.spam>
Date: Tue, 14 Feb 2012 15:04:43 +0000 (UTC)
Local: Tues, Feb 14 2012 10:04 am
Subject: Re: asymmetric correlation matrix?
"Benedikt F" wrote in message <jhbh3i$g8...@newscl01ah.mathworks.com>...
> Hi everyone,
> I tried the following code and was surprised by the result:

> Ts = randn(200,1000);  %random data
> Rtest = corrcoef(Ts);      %get correlation matrix of these
> isequal(Rtest,Rtest.')     %check correlation matrix for symmetry
> -> ans = 0

> The asymmetry is about the rounding error, but where does it come from? If each symmetric value is computed once and then assigned twice, this should't happen.

================

I don't have the statistics toolbox, but if corrcoeff is an mfile, you could look inside to verify whether  in fact each symmetric value is computed only once. It sounds like it isn't implemented this way.
Doing

Rtest=.5*(Rtest+Rtest.')

will probably help.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »