0

Let $U$ and $V$ be independently distributed random variables from the uniform distribution $U(0,1)$.

a.) Show that $U + V \mod 1$ is also $U(0,1)$.

b.) A random number generator is defined by $$R_n = \left(\frac{X_n}{8} + \frac{Y_n}{7}\right)\mod 1$$ where $X_0 = 0$, $Y_0 = 1$, $X_{n+1} = (9X_n + 3)\mod 8$, and $Y_{n+1} = 3Y_n \mod 7$ for $n = 0,1,\ldots$ Calculate $R_0, R_1,\ldots, R_5$. What is the period of the generator $\{R_n\}$.

Thoughts for a.) I have proved that if $U,V\sim U(0,1)$ then $U + V\sim U(0,1)$ in a probability theory and Statistical Inference course but I am not sure if that proof would apply when we the $\mod 1 $ operator.

Attempted solution b.) We have $$R_0 = \left(\frac{X_0}{8} + \frac{Y_n}{7}\right)\mod 1 = \frac{1}{7}\mod 1 = \frac{1}{7}$$ and $$R_1 = \frac{45}{56}$$ etc... What I do not understand in this question is what the question means by asking what is the period of the generator $\{R_n\}$?

Any suggestions in the latter above are greatly appreciated.

For the convolution:

Let $U\sim U(0,1)$ and $V\sim(0,1)$. Now, set $Z = U + V$. So we have $$f_{U}(t) = f_{V}(t) = \begin{cases} 1 \ &\text{if} \ t\in (0,1)\\ 0 \ &\text{otherwise} \end{cases}$$ Thus $$f_{Z}(t) = \int_{0}^{1}f_{U}(t-v)f_{V}(v)dv$$ so the convolution of $Z$ is $$f_{Z}(t) = \begin{cases} t \ &\text{if} \ t\in [0,1]\\ 2-t \ &\text{if} \ t\in (1,2) \end{cases}$$

Scooby
  • 83
  • 8

1 Answers1

1

For a) you calculate convolution $Z=X+Y$ like here.

Then for $t\in (0,1)$:

$$P(X+Y\pmod{1}\le t)=P(Z\le t)+P(1\le Z\le 1+t)=\int_0^t zdz+\int_1^{1+t}(2-z)dz\\=\frac{t^2}{2}+t-\frac{t^2}{2}=t$$

which is the CDF of a random variable distributed Uniform$(0,1)$

What you said [that $X+Y\sim\text{Uniform}(0,1)$], is not correct.

For b)

To find the period of $R_n$ means to find smallest positive integer $k$ such that $R_{n+k}=R_n$

You might note that: $R_n=\frac{(7X_n+8Y_n)\pmod{56}}{56}$

so you might see that

$$R_n=R_{n+k}\\ \iff (7X_n+8Y_n)\pmod{56}=(7X_{n+k}+8Y_{n+k})\pmod{56}\\ \iff 7(X_n-X_{n+k})+8(Y_n-Y_{n+k})\equiv 0\pmod{56}$$

So $8|X_n-X_{n+k}$ and $7|Y_n-Y_{n+k}$ which happens when $X_n=X_{n+k}$ and $Y_n=Y_{n+k}$

Now the first terms of $X_n$ are $0,3,6,1,4,7,2,5,0,\ldots$ (period $8$)

The first terms of $Y_n$ are $1,3,2,6,4,5,1,\ldots$ (period $6$)

So the period of $R_n$ is $\text{lcm}(6,8)=24$

Momo
  • 16,027
  • I see, so we have that $X\sim U(0,1)$ and $Y\sim (0,1)$ then we let $Z = X+Y$ and prove that $Z\sim U(0,1)$ and in doing so we have for $t\in (0,1)$ we calculate the integral you have there and since it equals $t$ we have proved that $Z\sim (0,1)$ since $t\in (0,1)$? – Scooby Jan 28 '17 at 01:30
  • Yes, that is correct. – Momo Jan 28 '17 at 01:33
  • I still don't really understand what we need to do for part a.). Could you provide more detail. The link you provided does not make much sense to me – Scooby Jan 28 '17 at 17:40
  • Also, I am not familiar with what $8|X_n - X_{n+k}$ and $7|Y_n - Y_{n+k}$ means, can you clarify? – Scooby Jan 28 '17 at 17:53
  • means that "$8$ divides $X_n-X_{n+k}$" – Momo Jan 28 '17 at 17:55
  • For the convolution you may take a look here. If your background is engineering, you might look here as well. – Momo Jan 28 '17 at 17:57
  • Thanks Ill see if that helps – Scooby Jan 28 '17 at 17:59
  • Last question what does $R_n$ is $1cm(6,8) = 24$ mean? – Scooby Jan 28 '17 at 18:02
  • "least common multiplier". And it is about the period $k$ of $R_n$, not about $R_n$ itself. – Momo Jan 28 '17 at 18:05
  • I am going to post what I think the solution for the convolution is. Could you check if I am getting it right or if it is thorough enough? – Scooby Jan 28 '17 at 18:21
  • Yes, that is correct. The crux is to get the integration limits right. – Momo Jan 28 '17 at 18:29
  • Could you take a look at this: http://math.stackexchange.com/questions/2128248/goodness-of-fit-tests-for-uniform-distribution-computing-d-n – Scooby Feb 04 '17 at 16:06