Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Simulation for the standard deviation
Replies: 27   Last Post: Mar 1, 2013 7:30 AM

 Messages: [ Previous | Next ]
 David Jones Posts: 80 Registered: 2/9/12
Re: Simulation for the standard deviation
Posted: Feb 26, 2013 9:04 PM

"Cristiano" wrote in message news:kgjnqn\$tvp\$1@dont-email.me...

On 26/02/2013 1:56, David Jones wrote:
> The standard work, Kendall & Stuart's "Theoretical Statistics" will
> provide a formula for variance of the sample variance. This could be
> used to provide a sampling interval for the sample variance, and hence
> for the sample standard deviation. Indeed, a formula for the variance of
>
> In the present context, an alternative is just to do multiple
> simulations of the sample standard deviation and use this to get the
> sampling distribution empirically. Of course this would assume that the
> random number generator has adequate properties.

In my simulations I use the (very good and very fast) dSFMT generator
and I get, for example, with n= 2, E[s^2]= .0833584 (good) and Var[s^2]=
.00972501.

Using the formula given here:
http://en.wikipedia.org/wiki/Variance#Distribution_of_the_sample_variance
I get: Var[s^2]= .00369776.

Using the formula given here:
http://mathworld.wolfram.com/SampleVarianceDistribution.html
I get: Var[s^2]= .000924963.

Where is the error?

Cristiano
============================================================

"Wolfram" is using a definition of sample variance with a divisor "N", the
sample size: "Wikipedia" is using the more standard definition of sample
variance with a divisor "N-1". This explains the ratio of 4 between the 2
answers. You need to check which version you have programmed and which you
actually want.

David Jones

Date Subject Author
2/20/13 Cristiano
2/21/13 Richard Ulrich
2/21/13 Cristiano
2/21/13 Richard Ulrich
2/22/13 Cristiano
2/22/13 Richard Ulrich
2/21/13 Ray Koopman
2/22/13 Ray Koopman
2/22/13 Cristiano
2/22/13 Ray Koopman
2/23/13 Cristiano
2/23/13 Ray Koopman
2/23/13 Cristiano
2/24/13 Cristiano
2/24/13 Ray Koopman
2/24/13 Cristiano
2/25/13 Ray Koopman
2/25/13 Cristiano
2/25/13 Ray Koopman
2/25/13 David Jones
2/26/13 Cristiano
2/26/13 David Jones
2/27/13 Ray Koopman
2/27/13 Cristiano
2/28/13 Ray Koopman
2/28/13 Cristiano
2/28/13 Ray Koopman
3/1/13 Cristiano