Find the probability density function of Y= min{X, 1 − X }.

probability distributions

Suppose we have $X$, a $\operatorname{Uniform}(0, 1)$ random variable which follows with the probability density function $f_X (x)$. Let $Y = \min\{X, 1 − X \}$. It wasn't asked but I want to find the pdf of $Y$.

I think I know how to deal with other transformations but the min here is really bothering me (since $\min(X)=X$ when $X$ is less then $0.5$ maybe I tried to investigate two cases for $Y$ ( $Y$ less then or equal to $0.5$ and greater then $0.5$) but I'm stuck.

Best Answer

There may be more elegant arguments (based on, say, symmetry). Here is one simply doing the bruteforce thing: compute the PDF via the CDF.

Consider the CDF of $Y$, $F$. For $y\in[0,1/2]$, $$\begin{align*} F(y) &= \mathbb{P}\{ Y \leq y\} = \mathbb{P}\{ \min(X,1-X) \leq y\} = \mathbb{P}\{ X \leq y\}\cup \{ 1-X \leq y\} \\ &= \mathbb{P}\{ X \leq y\}\cup \{ X \geq 1-y\} \\ &=\mathbb{P}\{ X \in (0,y]\cup[1-y,1)\} \end{align*}$$ and since $X$ is uniform on $(0,1)$, this gives $$ F(y) = 2y. $$ Therefore, $$ F(y) = \begin{cases} 0 & \text{ if } y < 0\\ 2y & \text{ if } y \in [0,1/2]\\ 1 & \text{ if } y > 1/2\\ \end{cases} $$ Differentiating the CDF, you get the PDF, call it $f$: $$ f(y) = \begin{cases} 0 & \text{ if } y < 0\\ 2 & \text{ if } y \in [0,1/2]\\ 0 & \text{ if } y > 1/2\\ \end{cases} $$ That is, $\boxed{Y\sim\mathrm{Uniform}(0,1/2)}$.