[Numpy-discussion] def of var of complex
Robert Kern
robert.kern@gmail....
Mon Jan 21 11:05:18 CST 2008
Neal Becker 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?
>
> I don't think there is any ambiguity about the definition of the variance of
> complex.
>
> Var(x) = E{(x-E[x])^2} = E{x}^2 - E{x}
That's currently what's implemented, but there is simply no evidence that anyone
ever uses this definition for complex random variables. Note that for real
variables,
E{(x-E[x])^2} = E{|x-E[x]|^2}
but for complex variables, there is a large difference. Since the || are
superfluous with real variables, probability texts rarely include them unless if
they are then going on to talk about complex variables. If you want to extend
the definition for real variables to complex variables, that is an ambiguity you
have to resolve.
There is, apparently, a large body of statistical signal processing literature
that defines the complex variance as
E{|z-E[z]|^2}
so, I (now) believe that this is what should be implemented.
--
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
More information about the Numpy-discussion
mailing list