# Compute the probability density function of Y

Let $$X \sim \mathrm{Uniform}(0, 1)$$ random variable with the probability density function $$f_X(x)$$ given by $$f_X(x) = \begin{cases} 1, &0 < x < 1, \\ 0, &\text{otherwise}\end{cases}$$ Let $$Y$$ = $$\min\,\{X, 1 − X\}$$. Compute the probability density function of $$Y$$.

So this $$Y=\min\,\{X, 1-X\}$$ confuses me. I'm not sure how to proceed.

When will $$Y=X$$ and $$Y=1-X$$ and how to consider these two cases?

• When X<1/2:Y=X with probability P(X<1/2) =1/2 else Y=1-X with probability P(X>1/2) =1/2 Mar 5, 2019 at 20:20

So this $$Y=\min\{X,1−X\}$$ confuses me. I'm not sure how to proceed.
When will $$Y=X$$ and $$Y=1−X$$ and how to consider these two cases?
Consider that when the minimum of two variables is less than a value, then at least one from the variables is less than that value.   (Also the support for $$Y$$ will be $$(0;1/2]$$.) $$\begin{split}\mathsf P(Y\leq y)&=\mathsf P(\min\{X,1-X\}\leq y)~\mathbf 1_{y\in(0;1/2]}\\[1ex]&=\mathsf P(X\leq y\cup 1-X\leq y)~\mathbf 1_{y\in(0;1/2]} \\[1ex]&=\mathsf P(X\leq y\cup X\geq 1-y)~\mathbf 1_{y\in(0;1/2]}\\[1ex] &~~\vdots\end{split}$$
• @ThePoorJew Because $X$ takes values from 0 to 1, and so the minimum of $X,1-X$ will therefore be greater than 0 and at most 1/2. Mar 5, 2019 at 23:50