0
$\begingroup$

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}$$

  • 0
    It's not true that if $U,V\sim U(0,1)$ then $U+V \sim U(0,1)$2017-01-28

1 Answers 1

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$

  • 0
    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)$?2017-01-28
  • 0
    Yes, that is correct.2017-01-28
  • 0
    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 me2017-01-28
  • 0
    Also, I am not familiar with what $8|X_n - X_{n+k}$ and $7|Y_n - Y_{n+k}$ means, can you clarify?2017-01-28
  • 0
    means that "$8$ divides $X_n-X_{n+k}$"2017-01-28
  • 0
    For the convolution you may take a look [here](https://www.youtube.com/watch?v=NMjL5F2qfvc). If your background is engineering, you might look [here](https://www.youtube.com/watch?v=3iIPvdmUegM) as well.2017-01-28
  • 0
    Thanks Ill see if that helps2017-01-28
  • 0
    Last question what does $R_n$ is $1cm(6,8) = 24$ mean?2017-01-28
  • 0
    "least common multiplier". And it is about the period $k$ of $R_n$, not about $R_n$ itself.2017-01-28
  • 0
    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?2017-01-28
  • 0
    Yes, that is correct. The crux is to get the integration limits right.2017-01-28
  • 0
    Could you take a look at this: http://math.stackexchange.com/questions/2128248/goodness-of-fit-tests-for-uniform-distribution-computing-d-n2017-02-04