Re: Randomness Test

• To: mathgroup at smc.vnet.net
• Subject: [mg58011] Re: [mg57977] Randomness Test
• From: yehuda ben-shimol <bsyehuda at gmail.com>
• Date: Thu, 16 Jun 2005 05:36:32 -0400 (EDT)
• References: <200506150958.FAA29744@smc.vnet.net>
• Reply-to: yehuda ben-shimol <bsyehuda at gmail.com>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,
The "Random' property that you are looking for is not well defined.
You may be looking for a practical proof for a UNIFORM distribution
around zero for this specific set of numbers, and under this context,
there is a sense to look at the bias to determine if the numbers are
uniformly distributed (with zero mean).
An immediate test would be (say that you already stored your numbers
in a list called l)
Mean[l]. For the specific example here you get 0.182068.

Both results show that there is a bias towards positive numbers, but,
to my opinion, the set of numbers given here is not sufficiently
large.
We all assume  that the random number generator of Mathematica is
accurate (well, at least I assume that) and if you check the running
mean you will probably will not ever get an accurate zero for the
mean.
Try this one for example
ListPlot[Rest[FoldList[Plus,
0, Table[Random[Real, {-1, 1}], {100000}]]]/Range[100000]]
and you will see what I mean.
yehuda
p.s.
Regarding my first remark, if you are looking for a different
distribution, you need to state so explicitly
yehuda

On 6/15/05, Dave miller <rks74us at yahoo.com> wrote:
> Okay, I have a sequence of numbers as below. When i do a scatter plot, there seems to be a bias toward positive numbers. Although when I run some tests like "runs test", it shows me that the numbers are random. If that is the case, then when i plot the numbers on a scatter plot, should'nt they be equally divided up and below the x axis? My goal is to prove that that there is a significant bias towards positive numbers.
>
>
> -0.164971751
> 1.137014315
> 0.622389791
> 0.048958333
> 1.232944503
> 0.3241877
> 0.1015
> 0.075538717
> 0.265537849
> -0.175252257
> 0.279807692
> -0.409979424
> 0.628232355
> -0.137667494
> 0.210711568
> -0.984059857
> -0.016778523
> 0.384063745
> 0.079707844
> -0.183936235
> -0.567394095
> 0
> 0.277777778
> 0.785185185
> 0.267555556
> 0.078717201
> 0.344352617
> 0
> 0.442245021
> 0.310665658
> 0.788764045
> 0.015850552
> -0.054098361
> 0
> 0
> 0.929482371
> 0.278787879
> 0.123773346
> 0.125175809
> 0
> 0
>
>

```

• Prev by Date: Re: For Loop and Array related
• Next by Date: Re: Plot difficulties <Error Machine Sized Real Number>
• Previous by thread: Randomness Test
• Next by thread: Re: Randomness Test