octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48315] cov.m: Incorrect result


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #48315] cov.m: Incorrect result
Date: Mon, 27 Jun 2016 03:11:56 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #48315 (project octave):

                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #2:

I can confirm the Matlab output (in R213b).

If our aim is just to be Matlab compatible, then yes, I think we should just
remove the conj, since that would match Matlab's definition, given at
<http://au.mathworks.com/help/matlab/ref/cov.html>.

If we want to work out what the "normal" convention is, it becomes
complicated.

Wikipedia defines the variance of a random vector as


 var(z) = E[(z-mu)(z-mu)*]


(note that the conjugate is on the second factor, not the first like
Matlab's).

However, that assumes vectors are column vectors.  Matlab's function assumes
each *row* is an instance of the random vector.  Is that row the *transpose*
of _z_, or the *conjugate transpose* of _z_?  I haven't thought it through,
but I assume that those two will give covariances that are conjugates of each
other.

In short, I think the input to this function is sufficiently non-standard that
we can just follow Matlab.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48315>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]