0

Distribution of the sine of a continuous, non uniform random variable?

I was trying to solve a simple exercise about univariate transformation of univariate continuous random variables. I'd like to know if my computation is wrong and to have some suggestions about the way of solving such exercises.

Let X be a random variable with the following density function: \begin{align} f_X(x)=\pi^{-2}2x\mathbb{I}_{\left[0,\pi\right]}( x ) \end{align} This exercise required to compute the density of \begin{align} Y=\sin X \end{align} Firstly, this is not uniform distribution, hence the distribution of this transformation won't be the Arcsine distribution, am I right? First of all, I'm sorry if my questions will seem so trivial, indeed I'm a beginner. Since I used the cdf method, \begin{align} \Pr(Y\le y)= \end{align}

\begin{align} \Pr(sin(X)\le y) & = \Pr(X\le arcsin(y)) + \Pr(X\ge π-arcsin(y))\\[10pt] \end{align}

Hence I computed:

\begin{align} \Pr(X\le arcsin(y)) & = \int\limits_{-\infty}^{arcsin(y)} \frac{1}{π^2}2x\mathbb{I}_{\left[0,\pi\right]}( x ) dx \end{align}

\begin{align} \Pr(X\ge π-arcsin(y)) & = \bigg[1-\int\limits_{-\infty}^{\pi-arcsin(y)} \frac{1}{π^2}2x\mathbb{I}_{\left[0,\pi\right]}( x ) dx \bigg] \end{align}

Now, I could change the extremes of integration, by evaluating the intersection between them and the interval $0\text{-}\pi$. Since the arcsin function lies between the interval \begin{align} [-\frac{π}{2}, +\frac{π}{2}]\ \end{align}

I can rewrite the integral as (is this correct?)

\begin{align} \int\limits_{0}^{\arcsin(y)} \frac{1}{π^2}2x dx + \bigg[1-\int\limits_{0}^{\pi-arcsin(y)} \frac{1}{π^2}2xdx \bigg]& = \frac{1}{\pi^2}2\bigg[\frac{x^2}{2} \bigg]_0^{\arcsin(y)} \ +1-\frac{1}{\pi^2}2 \bigg[\frac{x^2}{2}\bigg]_0^{\pi-arcsin(y)}\ & = \end{align}

\begin{align} \frac{1}{\pi^2}arcsin^2(y)+1-\frac{1}{\pi^2}(\pi-arcsin(y))^2 \end{align}

This is the cumulative distribution function of the transformation between \begin{align} (0,1]\ \end{align} The computation of the density just requires to compute the derivative of this function (...)

Nenne
  • 101
  • 2
  • This transformation is not one-to-one. Your question is a special case of the general one asked (and answered) at https://stats.stackexchange.com/questions/138763/pdf-of-function-of-x/138922#138922. – whuber Aug 13 '17 at 20:03
  • Thank you for replying. I read carefully your answer to that question and understood it. In fact, my question is the same one, however I just wanted to ask someone if my computation was correct. I would really appreciate if you could take a look at it. Thank you. – Nenne Aug 14 '17 at 17:11
  • 1
    One easy way to check a computed distribution is with simulation. Here is `R` code to simulate 10,000 draws from the original distribution, perform the transformation, plot the empirical distribution of the transformed values, and overplot your solution (in a different color) for comparison. `plot(ecdf(sin(pi * sqrt(runif(1e4)))), lwd=2); curve(pmin(1, pmax(0, 1 + (asin(x)^2 - (pi - asin(x))^2)/pi^2)), col="Red", add=TRUE)` – whuber Aug 14 '17 at 17:22

0 Answers0