help-octave
[Top][All Lists]
Advanced

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

Re: var(1) = 0 ??


From: pathematica
Subject: Re: var(1) = 0 ??
Date: Sat, 28 Jan 2012 03:40:09 -0800 (PST)

According to the manual it is possible to choose whether the denominator in
the calculation of the variance is N-1 (for an unbiased estimate of some
sample) or N (for the variance of some complete population) by setting a
second parameter in the function to "0" or "1", respectively, with 0 as
default (hence with N-1 as the default denominator). The behaviour of the
function is not as expected from the manual for vector arguments of size
one. 

The following is as expected from the manual: 


Unless I have misunderstood the manual, the last line of the following is
unexpected
 
I would have expected an error message rather than the last result.
Presumably, the function has been coded to return the same value as that
returned by Matlab. As noted above, it might be sensible if this were
acknowledged in the manual.

-----
However good you think Octave is, it's much, much better.
--
View this message in context: 
http://octave.1599824.n4.nabble.com/var-1-0-tp4334677p4335888.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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