Page 1 of 1

unbiased iterative function

Posted: Wed Sep 21, 2011 11:22 pm UTC
by 4=5
I have a list of 50 random numbers generated from an even distribution.
I want to generate another from the same distribution, replace the oldest number with it, and then repeat.

How do I keep the range of values from converging to 0?

My current method is to find the average distance from the average value and pick a random number from double that range but that ends up at zero.

Re: unbiased iterative function

Posted: Wed Sep 21, 2011 11:55 pm UTC
by gmalivuk
Well experimentally it appears that the expected mean absolute deviation for 50 data points is near 0.24663 times the range of the uniform distribution, whereas you want it at exactly 1/4 to maintain the same distribution for your next point.

So I guess one option is to calculate this value exactly, and then scale appropriately.

Alternatively, you could use sample variance instead, which is unbiased.