Re: Measuring the randomness of a signal...

From: Keith A. Lewis (lewis_at_PROBE.MITRE.ORG)
Date: 10/11/04


Date: Mon, 11 Oct 2004 19:09:10 +0000 (UTC)


"Nathan Baulch" <nathan@microsell.com.au> writes in article <41675c8a$0$48918$c30e37c6@lon-reader.news.telstra.net> dated Sat, 9 Oct 2004 13:38:26 +1000:
>I need an algorithm that can measure the randomness of a signal (variable
>length set of real numbers).
>Idealy it would return a number between 0 and 1, where 0 represents a
>straight line and 1 represents white noise.
>
>I currently use a clumsy (and rather processor intensive) method whereby I
>take a variety of exponential moving averages with different smoothing
>factors and look at the intersections between them. I'm sure there must be a
>far more well developed and formal way of measuring such a thing.

The thing about randomness is you can never empirically prove you have it,
only that you don't. So the best thing to do is run a bunch of different
tests.

Here's one: Correllate the signal with itself, with a small time shift. If
you get +1 or -1 you have a perfectly repeating signal (and your time shift
is related to the period of repetition); 0 indicates it could be random.

--Keith Lewis klewis {at} mitre.org
The above may not (yet) represent the opinions of my employer.



Relevant Pages