http://stat.fsu.edu/geo/diehard.html

And read chapter 7 of Numerical Recipes.

**Motivation**:

Random numbers are used:

1- To solve problems that are too complex
(stochastic algorithms for NP complete problems)

2- For optimization (simulated annealing, genetic algorithms).

3- System Simulation (physics and biology, econometrics...)

4- Non-parametric tests, bootstrap, permutation tests.

5- Quadrature methods using Monte Carlo.

Solving a deterministic problem by rewriting it as equivalent to a problem with a stochastic component.

Little Example as a reminder of what Monte-Carlo is:

If this exists it can be seen as
where has a uniform distribution on .
So we approximate it with

for a sample of size of uniform random variables.

Most methods, even if they need non-uniform random variates, as in simulation, still use uniform random variables as their starting points.

So we will spend some time explaining the basics of random numbers.

The machine being deterministic, there is definitely a problem, we will never get purely random numbers, they will only look so.

(We already saw that there are some pretty bad
ones, when we did the multidimensional visualization
of the **IBM randu** generated numbers with xgobi).

Also beware of , the basic unix one is bad.

Every time I reconnect to matlab, it provides the same random number the first time I ask for one:

>> rand ans = 0.9501

So it is quite predictable, and I could prove I am psychic.