# A random variable of a CDF is proportional to x on the interval [0, 1] and = 0 for x<0 and = 1 for x>1. What is a formula for this CDF?

I'm aware of the conditions of a CDF. to be a cumulative distribution: it is always nonnegative, when x→−∞ x→−∞ it tends to 0, when x→+∞ it tends to 1, and it is right-continuous .

• Note: this is the CDF of the uniform distribution over [0,1], classically denoted by U (0,1). – Harry49 Mar 16 '17 at 8:44
• $F(x)=\min(1,\max(0,x))$ works but is not as simple to read or understand as the definition in three pieces – Henry Mar 16 '17 at 9:03

The CDF is proportional to $x$ if it has the form $F(x)=cx$, for some constant $c$. You need that, for $x<0$, $F(x)=0$, and for $x>1$, $F(x)=1$.
What constant $c$ makes it such that $F(0)=0$, $F(1)=1$?
$F(0)=c\cdot0=0$ always.
$F(1)=c\cdot1=1$, so we need $c$ to be equal to 1.