From Prof Brian Ripley <ripley@stats.ox.ac.uk>  Fri May 19 10:04:09 2000
From: Prof Brian Ripley <ripley@stats.ox.ac.uk> (Prof Brian Ripley)
Date: Fri, 19 May 2000 10:04:09 +0100 (BST)
Subject: [Rd] variance of a scalar (PR#546)
Message-ID: <200005190904.KAA22592@toucan.stats.ox.ac.uk>


> Date: Fri, 19 May 2000 09:57:10 +0100 (BST)
> From: Jonathan Rougier <J.C.Rougier@durham.ac.uk>
> To: Prof Brian Ripley <ripley@stats.ox.ac.uk>
> cc: r-devel@stat.math.ethz.ch, R-bugs@biostat.ku.dk
> Subject: Re: [Rd] variance of a scalar (PR#546)
> 
> On Fri, 19 May 2000, Prof Brian Ripley wrote:
> 
> > > I was surprised to find that the variance of a scalar, using
> > > var(), is NA.  Surely this should be zero?
> > > 
> > 
> > Do you mean a vector of length 1? (S has no scalars.)  No, it should be
> > NA, as sum((x-xbar)^2)/(n-1) is NaN, or, in statistical terms, one has
> > no idea at all of the variability from a single sample.
> 
> I thought that might be the reason.  There is no mention of using n-1
> rather than n in the denominator on the help page.  Perhaps that might be
> added?

Um. What professional statistics package uses n, then?  Are you
suggesting that there is serious room for doubt?

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] variance of a scalar (PR#546)
Prof Brian Ripley