Finding the CDF of a min function where one of the arguments is a constant I'm reading through my lecture notes that the CDF of the random variable $Z = \min(D, a)$ where $a$ is a constant can be written as: 
$P[\min(D,a) \le y] = \begin{cases} 1 &,a\le y \\ P(D \le y)&, a>y\end{cases}$  
I can understand why it's $1$ for $a<y$. However, I think the second argument is valid only for $D<a$, but in case of $D>a$ the probability must be zero. So the previous function should be written as something like this: 
$P[ \min(D,a) \le y] = \begin{cases} 1 &, a<y \\ P(D \le y)&, a>y,D<a \\0&, a>y, D>a\end{cases} $
am I right? or does the first function implies the second function somehow?
 A: When you deal with the case where $a>y$ you have:
$$\mathbb{P}(\min (D, a) \leqslant y) = \mathbb{P}(D \leqslant y \text{ or }a \leqslant y) = \mathbb{P}(D \leqslant y) = \text{Some value}.$$
In your attempted solution you have pulled the random variable $D$ out of its probability statement and treated it as if it were an argument value, which is invalid.  It is important to understand that a probability statement concerning a random variable $D$ is telling you the probability of some event concerning that random variable.  This probability is not a function of $D$ -- the probability operator "integrates out" the random variable.

You can of course say that the event $\{ \min(D, a) \leqslant y \}$ occurs if $a \leqslant y$ or $D \leqslant y$, but the probability of this event is not a function of $D$.
A: Assuming $X$ is a continuous random variable, one can find the CDF of $Z=\min(X,a)$ as:
$\Pr(Z\le z)=\Pr(\min(X,a)\le z)$
$\qquad\qquad\quad=\Pr(\min(X,a)\le z,X\le a)+\Pr(\min(X,a)\le z,X>a)$
$\qquad\qquad\quad=\begin{cases}\Pr(X\le z,X\le a)+\Pr(X>a)&,\text{ if }z\ge a\\\Pr(X\le z,X\le a)&,\text{ if }z<a\end{cases}$
$\qquad\qquad\quad=\begin{cases}\Pr(X\le a)+\Pr(X>a)=1&,\text{ if }z\ge a\\\Pr(X\le z)&,\text{ if }z<a\end{cases}$ 
So I think the first argument suffices as far as the exact form of the CDF is concerned.
