0

Let $X$ have the uniform distribution $U(-1,3)$. Find the pdf of $Y=X^2$.

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

Because $Y=X^2$, and because $-1\le x \le3$, we have $X=\pm\sqrt Y$. Now, $X=-\sqrt Y$ when $-1\le x <0$ and $X=\sqrt Y$ when $0\le x \le 3$. That means $0\le y \le 1$ and $1< y \le 9$.

Let $v_1(Y)=-\sqrt Y$ and $v_2(Y)=\sqrt Y$. Then $\frac{d}{dy}[v_1(Y)]=-\frac{1}{2\sqrt Y}$ and $\frac{d}{dy}[v_2(Y)]=\frac{1}{2\sqrt Y}$.

So when $0 \le y \le 1$, we have $x \in [-1,1]=[-1,0] \cup (0,1]$, and thus $G(y)=P(Y\le y)=P(X^2 \le y)=P(X \le \pm \sqrt y)=P(X\le -\sqrt y) \cup P(X\le \sqrt y)=\int_{-1}^{v_1(y)} f(x)dx+\int_{0}^{v_2(y)}f(x)dx \Rightarrow g(y)=G'(y)=\frac{d}{dy}\int_{-1}^{v_1(y)} f(x)dx+ \frac{d}{dy}\int_{0}^{v_2(y)}f(x)dx=f[v_1(y)] \cdot |v_1'(y)|+f[v_2(y)] \cdot |v'_2(y)|=\frac{1}{4} \cdot \frac{1}{2\sqrt y}+\frac{1}{4} \cdot \frac{1}{2\sqrt y}=\frac{1}{4\sqrt y}$

And when $1 < y\le 9$, we have $G(y)=\int_{0}^{v_2(y)}f(x)dx \Rightarrow g(y)=f[v_2(y)] \cdot |v_2'(y)|=\frac{1}{4} \cdot \frac{1}{2 \sqrt y}=\frac{1}{8 \sqrt y}$

Therefore $g(y)=\left\{ \begin{array}{lr} \frac{1}{4 \sqrt y}, & \hspace{2mm} 0\le y \le1 \\ \frac{1}{8 \sqrt y}, & \hspace{2mm} 1< y \le9\\ \end{array} \right.$

Is this correct? I want to make sure my reasoning here is correct, thanks!

Karam
  • 741
  • 2
    It is neither meaningful nor correct to use the notation $P(X=x)$ for the density function of continuous random variables. For continuous variables, $P(X=x) =0$, so it does not coincide with $f(x)$. – PierreCarre Nov 11 '21 at 14:28
  • Answered at https://math.stackexchange.com/q/3533900/321264, https://math.stackexchange.com/q/3233821/321264, https://math.stackexchange.com/q/2842360/321264 – StubbornAtom Nov 11 '21 at 15:06

1 Answers1

1
  • If $x\leq 0$, $P(X^2 \leq x)=0$.

  • If $ 0 \leq x \leq 1$,

$$ P(X^2 \leq x) = P(-\sqrt{x} \leq X \leq \sqrt{x}) = \frac 12 \sqrt{x} $$

  • If $1 \leq x \leq 9$, $$ P(X^2 \leq x) = \frac 12 + P(1 \leq X \leq \sqrt{x})=\frac 12 +\frac{\sqrt{x}-1}{4} = \frac 14 + \frac 14 \sqrt{x} $$

  • If $x\ge 9)$, $P(X^2 \leq x) = 1$

Putting all together, $$P(X^2 \leq x)= \begin{cases} 0, & x \leq 0\\ \frac 12 \sqrt{x},& 0 < x \leq 1\\ \frac 14 + \frac 14 \sqrt{x}, & 1 < x \leq 9\\ 1, & x >9 \end{cases} $$

PierreCarre
  • 20,974
  • 1
  • 18
  • 34