Post · 5 min read· pp. 231–235

4.1.4 Solved Problems: Continuous Random Variables


Video Available Video Available

Problem

Let XX be a random variable with PDF given by \begin{equation} \nonumber f_X(x) = \left{ \begin{array}{l l} cx^2& \quad |x| \leq 1\ 0 & \quad \text{otherwise} \end{array} \right. \end{equation}

  1. Find the constant cc.
  2. Find EXEX and Var(X)(X).
  3. Find P(X≥12)P(X \geq \frac{1}{2}).
  • Solution
      1. To find cc, we can use ∫−∞∞fX(u)du=1\int_{-\infty}^{\infty} f_X(u)du=1:

        $1$=∫−∞∞fX(u)du=\int_{-\infty}^{\infty} f_X(u)du
        =∫−11cu2du= \int_{-1}^{1} cu^2du
        =23c.= \frac{2}{3} c.

        Thus, we must have c=32c=\frac{3}{2}.

      2. To find EXEX, we can write

        EXEX=∫−11ufX(u)du= \int_{-1}^{1} u f_X(u)du
        =32∫−11u3du= \frac{3}{2}\int_{-1}^{1} u^3 du
        =0.=0.

        In fact, we could have guessed EX=0EX=0 because the PDF is symmetric around x=0x=0. To find Var(X)(X), we have

        Var(X)\textrm{Var}(X)=EX2−(EX)2=EX2=EX^2-(EX)^2=EX^2
        =∫−11u2fX(u)du= \int_{-1}^{1} u^2 f_X(u)du
        =32∫−11u4du= \frac{3}{2}\int_{-1}^{1} u^4 du
        =35.=\frac{3}{5}.
      3. To find P(X≥12)P(X \geq \frac{1}{2}), we can write

        P(X≥12)=32∫121x2dx=716.P(X \geq \frac{1}{2})=\frac{3}{2} \int_{\frac{1}{2}}^{1} x^2dx=\frac{7}{16}.


Problem

Let XX be a continuous random variable with PDF given by

fX(x)=12e−∣x∣,for all x∈R.f_X(x)=\frac{1}{2}e^{-|x|}, \hspace{20pt} \textrm{for all }x \in \mathbb{R}.
If Y=X2Y=X^2, find the CDF of YY.

  • Solution
    • First, we note that RY=[0,∞)R_Y=[0,\infty). For y∈[0,∞)y \in [0,\infty), we have

      FY(y)F_Y(y)=P(Y≤y)=P(Y \leq y)
      =P(X2≤y)=P(X^2 \leq y)
      =P(−y≤X≤y)=P(-\sqrt{y} \leq X \leq \sqrt{y})
      =∫−yy12e−∣x∣dx=\int_{-\sqrt{y}}^{\sqrt{y}} \frac{1}{2}e^{-|x|} dx
      =∫0ye−xdx=\int_{0}^{\sqrt{y}} e^{-x} dx
      =1−e−y.=1-e^{-\sqrt{y}}.

      Thus, \begin{equation} \nonumber F_Y(y) = \left{ \begin{array}{l l} 1-e^{-\sqrt{y}} & \quad y \geq 0\ 0 & \quad \text{otherwise} \end{array} \right. \end{equation}


Problem

Let XX be a continuous random variable with PDF \begin{equation} \nonumber f_X(x) = \left{ \begin{array}{l l} 4x^3 & \quad 0 < x \leq 1\ 0 & \quad \text{otherwise} \end{array} \right. \end{equation} Find P(X≤23∣X>13)P(X \leq \frac{2}{3} | X> \frac{1}{3}).

  • Solution
    • We have

      P(X≤23∣X>13)P(X \leq \frac{2}{3} | X > \frac{1}{3})=P(13<X≤23)P(X>13)=\frac{P(\frac{1}{3} < X \leq \frac{2}{3})}{P(X > \frac{1}{3})}
      =∫13234x3dx∫1314x3dx=\frac{\int_{\frac{1}{3}}^{\frac{2}{3}} 4x^3 dx}{\int_{\frac{1}{3}}^{1} 4x^3 dx}
      =316.=\frac{3}{16}.

Problem

Let XX be a continuous random variable with PDF \begin{equation} \nonumber f_X(x) = \left{ \begin{array}{l l} x^2\left(2x+\frac{3}{2}\right) & \quad 0 < x \leq 1\ 0 & \quad \text{otherwise} \end{array} \right. \end{equation} If Y=2X+3Y=\frac{2}{X}+3, find Var(Y)(Y).

  • Solution
    • First, note that
      Var(Y)=Var(2X+3)=4Var(1X),using Equation 4.4\textrm{Var}(Y)=\textrm{Var}\left(\frac{2}{X}+3\right)=4\textrm{Var}\left(\frac{1}{X}\right), \hspace{15pt} \textrm{using Equation 4.4}
      Thus, it suffices to find Var(1X)=E[1X2]−(E[1X])2(\frac{1}{X})=E[\frac{1}{X^2}]-(E[\frac{1}{X}])^2. Using LOTUS, we have
      E[1X]=∫01x(2x+32)dx=1712E\left[\frac{1}{X}\right]=\int_{0}^{1} x\left(2x+\frac{3}{2}\right) dx =\frac{17}{12}
      E[1X2]=∫01(2x+32)dx=52.E\left[\frac{1}{X^2}\right]=\int_{0}^{1} \left(2x+\frac{3}{2}\right) dx =\frac{5}{2}.
      Thus, Var(1X)=E[1X2]−(E[1X])2=71144\left(\frac{1}{X}\right)=E[\frac{1}{X^2}]-(E[\frac{1}{X}])^2=\frac{71}{144}. So, we obtain
      Var(Y)=4Var(1X)=7136.\textrm{Var}(Y)=4\textrm{Var}\left(\frac{1}{X}\right)=\frac{71}{36}.

Problem

Let XX be a positive continuous random variable. Prove that EX=∫0∞P(X≥x)dxEX=\int_{0}^{\infty} P(X \geq x) dx.

  • Solution
    • We have

      P(X≥x)=∫x∞fX(t)dt.P(X \geq x)=\int_{x}^{\infty}f_X(t)dt.
      Thus, we need to show that
      ∫0∞∫x∞fX(t)dtdx=EX.\int_{0}^{\infty} \int_{x}^{\infty}f_X(t)dtdx=EX.
      The left hand side is a double integral. In particular, it is the integral of fX(t)f_X(t) over the shaded region in Figure 4.4.

      Fig.4.4 - The shaded area shows the region of the double integral of Problem 5.

      We can take the integral with respect to xx or tt. Thus, we can write

      ∫0∞∫x∞fX(t)dtdx\int_{0}^{\infty} \int_{x}^{\infty}f_X(t)dtdx=∫0∞∫0tfX(t)dxdt=\int_{0}^{\infty} \int_{0}^{t}f_X(t)dx dt
      =∫0∞fX(t)(∫0t1dx)dt=\int_{0}^{\infty} f_X(t) \left(\int_{0}^{t} 1 dx \right) dt
      $=\int_{0}^{\infty} tf_X(t) dt=EX \hspace{20pt} \textrm{since XX is a positive random variable}.$

Problem

Let X∼Uniform(−π2,π)X \sim Uniform(-\frac{\pi}{2},\pi) and Y=sin⁡(X)Y=\sin(X). Find fY(y)f_Y(y).

  • Solution
    • Here Y=g(X)Y=g(X), where gg is a differentiable function. Although gg is not monotone, it can be divided to a finite number of regions in which it is monotone. Thus, we can use Equation 4.6. We note that since RX=[−π2,π]R_X=[-\frac{\pi}{2},\pi], RY=[−1,1]R_Y=[-1,1]. By looking at the plot of g(x)=sin⁡(x)g(x)=\sin(x) over [−π2,π][-\frac{\pi}{2},\pi], we notice that for y∈(0,1)y \in (0,1) there are two solutions to y=g(x)y=g(x), while for y∈(−1,0)y \in (-1,0), there is only one solution. In particular, if y∈(0,1)y \in (0,1), we have two solutions: x1=arcsin⁡(y)x_1=\arcsin(y), and x2=π−arcsin⁡(y)x_2=\pi-\arcsin(y). If y∈(−1,0)y \in (-1,0) we have one solution, x1=arcsin⁡(y)x_1=\arcsin(y). Thus, for y∈(−1,0)y \in(-1,0), we have

      fY(y)f_Y(y)=fX(x1)∣g′(x1)∣= \frac{f_X(x_1)}{|g'(x_1)|}
      =fX(arcsin⁡(y))∣cos⁡(arcsin⁡(y))∣= \frac{f_X(\arcsin(y))}{|\cos(\arcsin(y))|}
      =23π1−y2.= \frac{\frac{2}{3 \pi}}{\sqrt{1-y^2}}.

      For y∈(0,1)y \in(0,1), we have

      fY(y)f_Y(y)=fX(x1)∣g′(x1)∣+fX(x2)∣g′(x2)∣= \frac{f_X(x_1)}{|g'(x_1)|}+\frac{f_X(x_2)}{|g'(x_2)|}
      =fX(arcsin⁡(y))∣cos⁡(arcsin⁡(y))∣+fX(π−arcsin⁡(y))∣cos⁡(π−arcsin⁡(y))∣= \frac{f_X(\arcsin(y))}{|\cos(\arcsin(y))|}+\frac{f_X(\pi-\arcsin(y))}{|\cos(\pi-\arcsin(y))|}
      =23π1−y2+23π1−y2= \frac{\frac{2}{3 \pi}}{\sqrt{1-y^2}}+\frac{\frac{2}{3 \pi}}{\sqrt{1-y^2}}
      =43π1−y2.= \frac{4}{3 \pi \sqrt{1-y^2}}.

      To summarize, we can write \begin{equation} \nonumber f_Y(y) = \left{ \begin{array}{l l} \frac{2}{3 \pi \sqrt{1-y^2}} & \quad -1 < y < 0\ \frac{4}{3 \pi \sqrt{1-y^2}} & \quad 0 < y < 1\ 0 & \quad \text{otherwise} \end{array} \right. \end{equation}