# use one uniform random variable to simulate another?

I ws given a question: Use 1000 simulations of uniform random variable U[0,1] to simulate 1000 simulations of another uniform random variable U[-3,7], how can I do that in Excel using rand() command?

## 1 Answer

If $X\sim U([0,1])$, it follows that $10X-3\sim U([-3,7])$.

• I was thinking about this, but U[-3,7] is a special case as you can minus -3 on both sides, what should I do if I want to simulate U[-3,6]? – whoisit Sep 6 '16 at 8:25
• You can always use the same "trick". If you want to simulate $U([-3,6])$, just consider $9X-3$. In general, if you want to simulate $U([a,b])$, consider $(b-a)X+a$. – Augustin Sep 6 '16 at 8:27