# Random sequence is dense in (0,1)

I have a question about probability and it has been confusing me for days.. Let $X_1,X_2,...$ be independent random variables with uniform(0,1) distribution from probability space ($\Omega$,$\cal F$,$P$).

1. Show that:

$P(\omega\in\Omega: \{X_1(\omega),X_2(\omega),X_3(\omega)...\} \text{is dense in (0,1)})=1.$

I don't know how to interpret the question and have no idea where to start...

• Welcome to Math.se. This site works best when people ask one question per post, so I edited out your second question. Feel free to post it as a new question. You can retrieve its text via the edit history (click the "edited" link above). – Nate Eldredge Oct 5 '14 at 14:46
• As a starting hint: what does it mean for a sequence to be dense in (0,1)? Do you know more than one way to characterize it? – Nate Eldredge Oct 5 '14 at 14:48
• Hi Nate. I read your note for 6710 at Cornell! It's way better than Durrett's book! Solved many confusions. Dense means for any x in the unit interval i can find a point in my sequence that is very close to it. for example the rational numbers in the reals are dense. That is the only definition of dense that i know.. – Victor Oct 5 '14 at 15:06
• Ok. Then as a first step, prove that a sequence of real numbers $\{a_n\}$ is dense in (0,1) if (and only if) for every pair of rationals $0 \le p < q \le 1$, there exists $k$ such that $a_k$ is an element of the open interval $(p,q)$. Glad you found the notes helpful! – Nate Eldredge Oct 5 '14 at 15:12
• Thanks Nate! I will think about it in the afternoon and post my thoughts or possible confusions later. I need to get some food now..Btw, Ithaca is getting chilly now.. – Victor Oct 5 '14 at 15:24

To interpret the question, first note that a set $A \subset [0,1]$ is dense in $[0,1]$ if for any $x \in [0,1]$ and $\epsilon > 0$, there exists $a \in A$ such that $|x-a| < \epsilon$.

To show the set $S(\omega) \dot = \{X_1(\omega),X_2(\omega),\dots\}$ is dense in $I \dot = [0,1]$ with probability 1, we need to show that for any $x \in [0,1]$, $\epsilon > 0$ and almost every $\omega \in \Omega$, there is an $i$ such that $|X_i(\omega) - x| < \epsilon$.

Let then $\epsilon > 0$ and $x$ such that $(x-\epsilon,x+\epsilon) \subset [0,1]$ be given. We have $P(|X_i - x| < \epsilon) = 2\epsilon$, since $P(X_i \in (a,b)) = b-a$ for any $0 < a < b < 1$.

Hint: Use Borel-Cantelli on the event $\{X_i \in B(x,\epsilon)\}$. If you go back to the definitions we wrote out at the beginning, you'll see the conclusion follows immediately.

Remark: You have to make a minor modification of the proof to take into account all $x \in [0,1]$, even those at the endpoints, $x = 0$ and $x = 1$.

Edit: As Did pointed out, the above will only lead you to show that for any $x \in \mathbb{R}$, $P(S\text{ not dense at } x) = 0$, while we need to show $P\left(\cup_{x \in I} \{S\text{ not dense at } x\}\right) = 0$. The union here is uncountable and so it is not even in our $\sigma$-algebra. However, it suffices to show

\begin{gather*} \bigcup_{x \in I} \{S \text{ not dense at } x\} = \bigcup_{x \in I \cap \mathbb{Q}} \{S \text{ not dense at } x\} \end{gather*} and then use countable subadditivity of measures to conclude the probability of the right-hand set above is 0.

The $\supset$ inclusion is immediate. If $x \in [0,1] \cap \mathbb{Q}^c$ and $\omega \in \{S \text{ not dense at } x\}$, then for this $\omega$ there is an $\epsilon > 0$ such that for any $i \geq 1$, $|X_i(\omega) - x| \geq \epsilon$. Choosing a $q \in I$ such that $|q - x| < \epsilon/2$, we see that $\omega \in \{S \text{ not dense at } q\}$. Otherwise, we'd have a $j$ such that $|X_j(\omega) - q| < \epsilon/2$, but then $|X_j(\omega)-x| < \epsilon$ by the triangle inequality, a contradiction. This yields the $\subset$ inclusion.

• And a not-so-minor modification of the proof is also needed to take into account the fact that density at $x$ holds almost surely only and that there are uncountably many $x$. – Did Oct 5 '14 at 15:01
• What an oversight. Thank you, will edit. – snar Oct 5 '14 at 15:07
• using borel cantelli gives me the the probability of that event happens i.o is 1. So that means i can always land arbitrarily close to the a random x. I sort of get it. But why do we need to take into account the fact that density at x holds almost surely only and that there are uncountably many x? – Victor Oct 5 '14 at 15:17
• @Jason The uncountably many $x$ part means that you can't just take an intersection over all $x \in [0,1]$ in the argument snarski gave. (But you can take $x \in \mathbb{Q} \cap [0,1]$ and then take intersections). – Ian Oct 5 '14 at 15:31

Define $S:=\left\{ X_{n}\mid n=1,2\dots\right\}$ as random set.

Define $I:=\left\{ \left\langle r,s\right\rangle\in\mathbb{Q}\cap\left(0,1\right) \mid r<s\right\}$ and note that $I$ is countable.

For $\left\langle r,s\right\rangle \in I$ let $E_{r,s}$ denote the event that $S\cap\left(r,s\right)=\emptyset$.

Then $P\left(E_{r,s}\right)=0$ and consequently $P\left(\bigcup_{\left\langle r,s\right\rangle \in I}E_{r,s}\right)=0$.

(This can be proved on base of $P\{X_1\notin (r,s)\}=1-(s-r)<1$ combined the fact that the $X_n$ are iid.)

Equivalently: $$P\left(\bigcap_{\left\langle r,s\right\rangle \in I}E_{r,s}^{c}\right)=1$$

and this can be recognized as the event that $S$ is dense in $\left(0,1\right)$.

• If talk of "random sets" is unclear, note that $E_{e,s}$ can also be written as $E_{r,s} = \bigcup_{n=1}^\infty \{X_n \in (r,s)\}^c$. There is a bit of work involved in showing it has probability zero. – Nate Eldredge Oct 5 '14 at 15:46