Application of the change of random variable technique

109 Views Asked by At

The following equation (in red box) is bugging me (I'm keeping the source to myself for now in case the following text does contain a mistake):

enter image description here

For those having difficulties visualizing images here is the equation:

$$\int_0^{\pi/2}f(\theta)d\theta = \int_{g(0)}^{g(\pi/2)}\frac{f\left(g^{(-1)}(x)\right)}{g'\left(g^{(-1)}(x)\right)}dx\tag 1$$

The issues I have with this is that the LHS of the equation is simply $1$ - i.e. the integration over the support of the pdf.

On the other hand, it seems as though the idea behind the RHS is the distribution of the transformed random variable, i.e. the integration of the general formula derived from the application of the chain rule $f_Y(y)=F'_Y(y)=f_x (v(y))\cdot v'(y),$ which I would have pictured in this particular example as

[Corrections after the answer provided by Andrei Crisan!]

$$\begin{align}\require{enclose}F_X(x) &= \int_0^{x=\mathsf {tan}(\theta)}f_\theta\left(\mathsf{arctan}(x)\right)\cdot \lvert \mathsf{arctan}(x)'\rvert dx\\[2ex] &=\color{red}{\frac{2}{\pi}} \int_0^{x=\mathsf {tan}(\theta)}\enclose{horizontalstrike}{\mathsf{arctan}(x)}\cdot \color{red}{\frac{1}{x^2+1} }dx\\[2ex] &=\frac{\enclose{horizontalstrike}1 2}{\pi}\enclose{horizontalstrike}{\left(\mathsf{arctan(x)}\right)^2}\mathsf{arctan(x)}\tag 2 \end{align}$$

$\enclose{horizontalstrike}{\text{which I am not sure is the cdf of the half-Cauchy distribution}}$ which is the cdf of the half-Cauchy, but it does show (in red) the pdf of the half-Cauchy, i.e.

$$f_X(x) = \frac{2}{\pi}\frac{1}{x^2 + 1}$$

in the intermediate step.

Even simpler,

Why is the author dividing on the RHS of eq.(1) instead of multiplying? And (for extra points) where is the mistake in my derivation of the hal-Cauchy cdf in eq.(2)?

1

There are 1 best solutions below

2
On BEST ANSWER

His derivation is correct. Let's look a bit at the change of variable that occurs there. He says that: $$ x = tan(\theta) = g(\theta) $$ If we differentiate $g$ we get: $$ g^\prime(\theta) = \frac{1}{cos^2(\theta)} = 1 + tan^2(\theta) = 1 + g^2(\theta) $$ Hence, if we replace $\theta = g^{-1}(x)$ in the equation above we get: $$ g^\prime (g^{-1}(x)) = 1 + g^2(g^{-1}(x)) = 1 + x^2 \tag1 $$ In the integral now, namely in $\int_0^{\frac{\pi}{2}}f(\theta)d\theta$ making the substitution $\theta = arctanx$ we get that $d\theta = \frac{dx}{1+x^2}$, hence: $$ \int_0^{\frac{\pi}{2}}f(\theta)d\theta = \int_{0}^{\infty}f(g^{-1}(x))\cdot\frac{dx}{1+x^2}\tag2 $$

But, from $(1)$ we know that $g^\prime (g^{-1}(x)) = 1 + x^2$. Substituting this in $(2)$ yields:

$$ \int_0^{\frac{\pi}{2}}f(\theta)d\theta = \int_{0}^{\infty}\frac{f(g^{-1}(x))}{g^\prime (g^{-1}(x))}dx $$ which is the desired result.

Also, your mistake is that you said $f_{\theta}(arctan(x)) = arctan(x)$, which is wrong as $f_\theta$ is constant (and equal to $\frac{2}{\pi}$).