Travis E. Oliphant wrote: > Robert Kern wrote: >> Neal Becker wrote: >> >>> I noticed that if I generate complex rv i.i.d. with var=1, that numpy says: >>> >>> var (<real part>) -> (close to 1.0) >>> var (<imag part>) -> (close to 1.0) >>> >>> but >>> >>> var (complex array) -> (close to complex 0) >>> >>> Is that not a strange definition? >>> >> >> >> 2. Take a slightly less naive formula for the variance which seems to show >> up in >> some texts: >> >> mean(absolute(z - mean(z)) ** 2) >> >> This estimates the single parameter of a circular Gaussian over RR^2 >> (interpreted as CC). It is also the trace of the covariance matrix above. >> > > I tend to favor this interpretation because it is used quite heavily in > signal processing applications where "circular" Gaussian random > variables show up quite a bit --- so much so, in fact, that most EE > folks would expect this as the output and you would have to explain to > them why there may be other choices that make sense. > > So, #2 is kind of a nod to the signal-processing community (especially > the communication section).
<sigh> Fair enough. I relent. You implement it; I'll document the correct^Wcov() alternative. :-) > But, there is also merit to me in #3 (although it may be harder to > explain why the variance returns a complex number --- if that is what > you meant). Yes. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion