# [racket] a small programming exercise

Stupid me, for I did already read about Benford's law.
Thanks. Jos
>* -----Original Message-----
*>* From: users-bounces at racket-lang.org
*>* [mailto:users-bounces at racket-lang.org] On Behalf Of Chris Stephenson
*>* Sent: 15 October 2010 11:13
*>* To: users at racket-lang.org
*>* Subject: Re: [racket] a small programming exercise
*>*
*>* On 15/10/10 11:33, Jos Koot wrote:
*>* > When taking a long list of pseudo random positive integers most of
*>* > which are far greater than the base, I expect about the
*>* same frequency
*>* > for each first digit from 1 to base-1. This seems to hold
*>* if the base
*>* > is a power of 10, but for other bases, e.g. base 24, I get rather
*>* > unexpected results. See program below. Someone has an idea
*>* how this can happen?
*>*
*>*
*>* That is exactly the effect that Shriram was looking for.
*>*
*>* Think about the decimal numbers in the range 1-200. How many
*>* start with
*>* 1?- More than half. The range 1-1000 is an exception. But
*>* natural distributions are not uniform over a fixed range.
*>* They are bell curves of one sort or another. If you have a
*>* natural random distribution there will always be a skew
*>* toward the smaller digits. It is quantified as Benford's law.
*>*
*>* --
*>* Chris Stephenson
*>* cs at cs.bilgi.edu.tr
*>* _________________________________________________
*>* For list-related administrative tasks:
*>* http://lists.racket-lang.org/listinfo/users
*