English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am looking for answers around periodicity, autocorrelation and independence. The random numbers are generated from a Random Number Generator (RNG) using a Standard normal distribution.

2006-12-01 07:04:47 · 6 answers · asked by Assistme 1 in Science & Mathematics Mathematics

The RNG Is proprietory, so i cannot really see the code. I need to mathematically prove that the numbers produced are random. I have produced 1 million numbers and I need some statistical methods to do this.....any further ideas?

2006-12-01 07:15:03 · update #1

6 answers

A random number generator is not truly random, unless it uses some sort of hardware process (like the ambient noise from a microphone in a crowded room). Every "code only" generator has periodicity, and an algorithm can be found to calculate the (n+1) term in the series, given the first n values.

But the larger your set, the better odds you've got of finding a weakness, and if you don't find anything, the better your RNG is.

Often, RNG's are an iterative process: the nth term in the sequence s(n) = f[s(n-1)] some function of the previous element in the series. So compare s(n-1) to s(n), then compare s(n-2) to s(n), then s(n-3) to n, and so on.

Well-designed RNG's probably won't be that easy to crack. So move along to higher dimesions: compare s(n-1) AND s(n-2) to s(n), then s(n-2) AND s(n-3) to s(n), etc. Then do a 4-dimensional calculation, comparing the previous 3 values to s(n), and so on...

Again, the more data you have, without being able to find a pattern, the better your RNG is.

2006-12-01 08:46:23 · answer #1 · answered by Polymath 5 · 0 0

If you're not math-phobic (which I'm guessing you definitely aren't) Knuth Vol. 2 (Seminumerical Algorithms) has a load of good mathematical tests for random number generators. The reference below points to several other sources that may be useful.

Steven Lott has a Python program that runs 11 of Knuth's tests; might need so adaptation, but it's a good starting point.

2006-12-01 19:09:51 · answer #2 · answered by Joe M. 3 · 0 0

You need to go back to your RNG and figure out how it is generating the numbers. Also you should probably see if it uses a seed number. If I remember correclty random numbers generated by a computer aren't truely random.

Here's a link to get you started
http://en.wikipedia.org/wiki/Random_number_generator

2006-12-01 15:11:04 · answer #3 · answered by Merrily 3 · 0 0

The only reasonable test would be to generate thousands of random numbers and graph them. Then you might be able to see if the numbers are random or if patterns appear.

2006-12-01 15:11:38 · answer #4 · answered by Anonymous · 0 0

I would suggest the Kolmolgorov-Smirnov test.

edit: Sorry, I thought you were talking about a uniform distribution. There are better tests for normallity. You can use a normal probability plot to see visually if your data is normal. You can also use the Shapiro-Wilk test. That is probably the best one for determining normality.

2006-12-01 15:46:44 · answer #5 · answered by blahb31 6 · 0 0

It's not completely random, but if you want to show that it's pretty close to random, just print off like 50 results and see if anyone can find a pattern...

2006-12-01 15:08:24 · answer #6 · answered by agfreak90 4 · 0 0

fedest.com, questions and answers