From ligges@statistik.uni-dortmund.de  Fri May 19 10:01:29 2000
From: ligges@statistik.uni-dortmund.de (Uwe Ligges)
Date: Fri, 19 May 2000 11:01:29 +0200
Subject: [Rd] variance of a scalar (PR#546)
References: <200005190842.KAA28916@pubhealth.ku.dk>
Message-ID: <392502E9.134C262B@statistik.uni-dortmund.de>


J.C.Rougier@durham.ac.uk wrote:
> 
> I was surprised to find that the variance of a scalar, using
> var(), is NA.  Surely this should be zero?

1. This is ok. var(.) is defined as:
   var(x)= (1 / (n - 1)) * sum(x - mean(x))^2
                 ^^^^^
If you has got a scalar: n - 1 = 0, so it is undefined!

> 
> Version:
>  platform = sparc-sun-solaris2.7
>  arch = sparc
>  os = solaris2.7
>  system = sparc, solaris2.7
>  status = Patched
>  major = 0
>  minor = 99.0

You should upgrade to 1.0.1

Regards,
Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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)
Uwe Ligges