Expected value and Variance of $Y = \max(X, 2)$

221 Views Asked by At

Problem: Random variable $X$ has uniform distribution under $[0,4]$ and $Y = \max(X,2)$. Find:

  • $P(Y<3)$
  • Expected value of $Y$
  • Variance of $Y$

Attempted solution:

$$ F_Y(3) = P(Y<3) = P(\max(X,2)<3) = P(X<3)P(2<3) = \frac{3}{4} $$

Since $F_X(3) = \frac{3-0}{4-0}$.

I am highly suspicious of this answer. What is the best approach to finding the expected value and variance of $Y$?

1

There are 1 best solutions below

1
On

If $X \sim U(0,4)$, then the pdf of $X$ is $f:[0,4] \to \mathbb{R}$ defined as $f(x)=\frac{1}{4}$.

As $Y=\max(X,2)$, $Y= \begin{cases} X, & \hspace{2mm} X>2 \\ 2, & \hspace{2mm} X \leq 2\\ \end{cases}$

$\qquad\begin{align}P(Y<3)&=P(0 \le X<3)\\&=\int_{0}^{3}f(x)dx\\&=\int_{0}^{3}\frac{1}{4}dx\\&=(3-0)\frac{1}{4} \\&=\frac{3}{4} \\[2ex] E(Y)&=E(X\mid X>2)~P(X>2)+2~P(X\le 2)\\&=\int_{2}^{4}\frac{x}{4}dx+2\int_{0}^{2}\frac{1}{4}dx\\&=\frac{20}{8} \\[2ex] E(Y^2)&=\int_{2}^{4}\frac{x^2}{4}dx+4\int_{0}^{2}\frac{1}{4}dx\\&=\frac{80}{12} \\[2ex] \therefore\quad Var(Y)&=\frac{80}{12}-(\frac{20}{8})^2\\&=\frac{5}{12}\end{align}$