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

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.

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)}$$.
• I don't really get why this : \begin{align*} F(y) &= \mathbb{P}\{ Y \leq y\} =\mathbb{P}\{ X \in (0,y]\cup[1-y,1)\} \end{align*} gives us F(y) = 2y. – Student number x Mar 3 at 18:01
• @Studentnumberx Which part do you not understand in what you quoted? The last? If so, just note that the measure under the uniform distribution of $(0,y]$ is $y$, and so is the measure of $[1-y,1)$, and the two intervals are disjoint. (Or, if $y=1/2$, their intersection is $\{1/2\}$, which has measure 0) – Clement C. Mar 3 at 18:03