Re: Puzzled by the "Variance"
- To: mathgroup at smc.vnet.net
- Subject: [mg86542] Re: Puzzled by the "Variance"
- From: Bill Rowe <readlists at sbcglobal.net>
- Date: Thu, 13 Mar 2008 04:34:11 -0500 (EST)
On 3/12/08 at 5:29 AM, philyer at gmail.com (Elements) wrote: >I'm puzzled by the function "Variance". We can learn how to >calculate variance from this >page:http://mathworld.wolfram.com/SampleVariance.html. For example, >calculate the sample variance of {1,2,3}. the average of {1,2,3} is >2, then the variance should be ((1-2)^2+(2-2)^2+(3-2)^2)/3=2/3. But >mathematica gives that: >In[10]:= Variance[{1.0,2.0,3.0}] >Out[10]= 1. >Why?? Look at the documentation for Variance paying particular note details in the More Information section. Specifically, Mathematica computes an unbiased estimate of the variance which will use n-1 as the divisor (2 in this particular case). Using n as the divisor is the maximum likelihood estimate for the variance. You might also see the difference in divisors referred to as sample variance (n-1) and population variance (n).