# randomness extraction of real valued sequences of numbers

I have a sequence of numbers $x_1, x_2, \dots, x_n, \dots \in \mathbb{R}$ I would like to extract fair bits from that sequence.

My first thought was to use the Von Neumann extractor. For a sequence of 0 and 1,

• divide sequence into pairs
• eliminate all occurrences of 00 and 11
• apply transformation 011 and 100

This produces a sequence of fair bits from biased bits *even if you do not know the bias $p = \mathbb{P}[x_i = 1]$ as long as your sequence is

• a Bernoulli trial
• independently distributed
• identially distributed

The sequence of numbers I have is the hourly readings from a sensor, so it exhibits cyclic behavior every 24 hours + every week. If I compute the expected value over time, it may be possible to subtract out the daily and weekly cycles leaving sequence of loosely self-correlated real numbers.

How can I extract randomness from here in a simple way?

• Presumably these are actually rational numbers? – usul May 25 '14 at 1:06
• You'll need to make some assumption about how these numbers are generated ... how independent is each number given the previous ones? and so on. – usul May 25 '14 at 1:08
• @usul to simplify even further, these are independent bits (just 0 and 1) but they are not identically distributed. – john mangual May 25 '14 at 11:55
• If $p_i$ is the bias of the $i$th coin, I conjecture that you'll need to assume $0<a<p_i<b<1$ for all $i$. Further, you'll probably need to consider contiguous runs of flips of length inversely proportional to $1-b+a$. – Aryeh Mar 31 '17 at 11:17