Let $X$ be a random variable with a PDF $f(x)=\frac{1}{9}x^2\mathbb{1}_{(0,3)}(x)$. Find the distribution and PDF of $Y=\max\{2,X\}$ .
$F_X(t)=\int\limits_0^tf(x)dx=\int\limits_0^t\frac{1}{9}x^2dx=\frac{t^3}{27}$
$Y=\begin{cases}
2 &\text{for $X \in (0,2)$} \\
X &\text{for $X \in [2,3)$}
\end{cases}$
$F_Y(t)=\Bbb P(Y \leq t)=\Bbb P(\max\{2,X\}\leq t)=\Bbb P(2\leq t, X\leq t)= \ ?$
PDF:
$f_Y(t)=\begin{cases}
C &\text{for $X \in (0,2)$} \\
\frac{1}{9}x^2 &\text{for $X \in [2,3)$}
\end{cases}$
$\int\limits_0^2Cdt+\int\limits_2^3\frac{1}{9}t^2dt=2C+\frac{19}{27}=1$, then:
$C=\frac{4}{27}$
Best Answer
First observe that Y-support is the following: $y \in[2;3]$
Then observe that $P(Y=2)=F_X(2)=\int_0^2 f(x)dx=\frac{8}{27}$
Concluding, Y-distribution is the following
$$ F_Y(y) = \begin{cases} 0, & \text{if $y<2$} \\ \frac{8}{27}, & \text{if $y=2$} \\ \frac{y^3}{27}, & \text{if $2<y<3$} \\ 1, & \text{if $y\geq 3$} \end{cases}$$
As you can see the distribution function has "a jump" in $Y=2$ thus the rv is not absolutely continuous (it is a mixed distribution)
So technically the PDF (as it is defined only for continuous rv) does not exist.
Actually there is a generalization of density called "mixed density", or "mixed PDF". You can calculate it by derivating F where the variable is continuous and calculating $p(y_0)=F_Y(y_0^+)-F_Y(y_0^-)$ where Y is discrete (in your case in $Y=2$)
Here is a drawing of the transformation function. The line in red is $Y=max(2;X)$
As you can see, when $X \in (0;2]$, a mass of probability $p=\frac{8}{27}$ is concentrated in a singleton: $Y=2$. This means that the resulting Law of Y is discret in this point...in the rest of Y-support, Y is continuous being $Y=X$