Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Complex Number Covariance Matrix
Date: Tue, 25 Mar 2008 11:13:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 35
Message-ID: <fsamnv$ha4$1@fred.mathworks.com>
References: <fs983d$ofr$1@fred.mathworks.com> <fs9kjc$6e5$1@fred.mathworks.com>
Reply-To: "David Doria" <daviddoria@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1206443583 17732 172.30.248.38 (25 Mar 2008 11:13:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 25 Mar 2008 11:13:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:458999



So if I do:
(1/(n*sigma_x * sigma_y) * sum((x-ux)'*(y-uy))

where sigma is the sample standard deviation, Will this give
numbers between 0 and 1? (0 is "uncorrelated" and near 1 is
"highly correlated")  My problem before was I was getting
numbers like 8 or 10, and I didn't know if those were "good"
or "bad".

Thanks,

Dave

> this will give you a 2 x 2 matrix in which the two
diagonals are the two 
> (biased) variances of x and y, and the two off-diagonal
elements c(1,2) and c
> (2,1) are the (biased) covariances
> 
>  1/n*sum((x-ux)'*(y-uy))  % (Note the conjugate transpose.)
> 
> and its complex conjugate, respectively.
> 
>   It is up to you to decide if that is what you want as a
measure of similarity.  I 
> believe that is what is usually meant by the covariance of
complex quantities.
> 
>   However, I would have thought you would prefer to use
correlation values in 
> which the above quantities are normalized using the variances.
> 
> Roger Stafford
>