       Re: Variance of sample and whole dataset

• To: mathgroup at smc.vnet.net
• Subject: [mg51210] Re: Variance of sample and whole dataset
• From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
• Date: Fri, 8 Oct 2004 02:55:07 -0400 (EDT)
• References: <ck340j\$b1j\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```You can define a variance function thus:

var[dataset_]:=(Apply[Plus,#^2]/Length[#]-(Apply[Plus,#]/Length[#])^2)&[dataset];

and use it as in this example:

dataset={a,b,c};
var[dataset]

giving

(-(1/9))*(a + b + c)^2 + (1/3)*(a^2 + b^2 + c^2)

Steve Luttrell

"Uwe Ziegenhagen" <newsgroup at ziegenhagen.info> wrote in message
news:ck340j\$b1j\$1 at smc.vnet.net...
> Hello,
>
> with Variance[list] and StandardDeviation[list] I get the
> variance/std.dev for samples.
>
> Is there any builtin command for the variance of whole dataset (division
> by n, not by n-1)?
>
> Uwe
>
>
> --
>
> mail to newsgroup at ziegenhagen.info is read only from time to time. If
> you need an urgent answer, google for me.
>

```

• Prev by Date: Re: Re: solve and simplify. force left hand side to be 0==
• Next by Date: Re: Re: Conveniently Restarting Notebooks
• Previous by thread: Re: Re: Variance of sample and whole dataset
• Next by thread: Sorting the Elements of a Non Rectangular List