### Basic Examples

Basic Examples

Generate a sequence of random integers and test it for equidistribution:

sequence=RandomInteger[{0,1},1000];

In[]:=

Visualize the sequence:

ArrayPlotPartition[sequence,16],

In[]:=

Out[]=

[sequence,"TestStatistic"]

In[]:=

9

10

Out[]=

[sequence,"PValue"]

In[]:=

0.342782

Out[]=

Generate a sequence of random reals and test it for equidistribution:

sequence=RandomReal[{0,1},1000];

In[]:=

Visualize the sequence:

ArrayPlotPartition[sequence,16],

In[]:=

Out[]=

[sequence,"TestStatistic"]

In[]:=

990

Out[]=

[sequence,"PValue"]

In[]:=

0.565376

Out[]=

Generate variates of the normal distribution and test if they are equidistributed:

variates=RandomVariate[NormalDistribution[],1000];

In[]:=

Visualize the variates:

ArrayPlotPartition[variates,16],

In[]:=

Out[]=

Histogram[variates,40,"PDF"]

In[]:=

Out[]=

Transform the variates so that the range is between 0 and 1:

transformedvariates=CDF[NormalDistribution[],variates];

In[]:=

Visualize the transformed variates:

ArrayPlotPartition[transformedvariates,16],

In[]:=

Out[]=

Histogram[transformedvariates,40,"PDF"]

In[]:=

Out[]=

Test if the transformed variates are equidistributed:

### Applications

Applications

Test to see if rule 30 is equidistributed: