Let X ~ U[0,5]. Find cumulative distribution function of Y=min(2,x)
P(Y $\le$ t) = P (min(2,x) $\le$ t) = 1 - P (min(2,x)>t) = 1-P(2>x and x>t)
for t<0 we have P(Y $\le$ t)=0
for t $\in$ [0,2) we have P(Y ≤ t)= 1-P(2>x and x>t) = 1-P(x>t)=P(x$\le$t)=$\frac{1}{5}$$\int_0^t \! 1 \, \mathrm{d}x.$=$\frac{t}{5}$
for t$\in$[2,+${\displaystyle \infty}$) we have P(Y ≤ t)=1
Where is the mistake ?