# Uniformly Distributed Random Variable over an interval

Let $X$ be a random variable uniformly distributed over a nontrival interval $[c,d]$, and let $Y = aX+b$. For what choice of real constants $a$ and $b$ is $Y$ uniformly distributed over [0,1]?

How could I fully comprehend this question? This is my interpretation so far:

$Y$ is a function of X. Does that mean the interval of $Y \subset X$? If yes, does it the interval of $Y$ MUST ALWAYS be a subset of $X$

From $Y = aX+b$ we know that the CDF of Y, $F_Y(y)$ = $$P(Y\leq y) \\ P(aX+b \leq y) \\ P(X \leq \frac{y-b}{a})$$ Hence, $F_Y(y)$ = $F_x(\frac{y-b}{a})$

So, for Y to be uniformly distributed over [0,1], $$a > 0 \\ y-b > 0 \\ b < y$$

Let me know if I have the right approach to the problem!

## 1 Answer

All you need to care about is if $X = c$, then $Y = 0$, and if $X = d$, then $Y = 1$. So in particular, we want the solution to the system $$0 = ac + b, \quad 1 = ad + b$$ for $a, b$ given $c, d$. This gives us $$a = \frac{1}{d-c}, \quad b = -\frac{c}{d-c}.$$ No solution is possible if $c = d$, but this is assumed to not be possible.

Of course, this is not a unique solution because there is no stipulation that the transformation $Y = aX + b$ must also be order-preserving. That is to say, you could also solve the system $$1 = ac + b, \quad 0 = ad + b$$ and the resulting transformation would also give $Y \sim \operatorname{Uniform}(0,1)$.

• thank you for the explanation but is $[0,1] \subset [c,d]$? – misheekoh Mar 6 '16 at 21:25
• @misheekoh No. The transformation works for any $c < d$, so it is not a requirement that $[0,1] \subset [c,d]$. – heropup Mar 6 '16 at 21:34