PDF of arccos and arcsin of a uniform random number

AI Thread Summary
The discussion revolves around finding the probability density function (PDF) for the arccosine and arcsine of a uniform random variable. The user initially attempts to derive the cumulative distribution function (CDF) for X = cos(Y), where Y is uniformly distributed over [0, 2π]. Clarifications highlight that the relationship between P(cos(Y) ≤ x) and P(Y ≤ arccos(x)) is not straightforward due to the behavior of the cosine function. The conversation emphasizes the importance of considering the intervals and properties of the cosine function to accurately determine the PDF. Ultimately, the user arrives at a correct expression for the PDF of Y, demonstrating the resolution of their query with community assistance.
thapyhap
Messages
8
Reaction score
0

Homework Statement



I want to find the PDF for arccos and arcsin of a uniform random number. Given:

<br /> Y\sim\mathcal{U}(0,2\pi) \\<br /> X = cos(Y)<br />

The Attempt at a Solution



I started with trying to find the CDF:

<br /> \begin{align}<br /> F_X&amp; = P(X \le x) \\<br /> &amp; = P(cos(Y) \le x) \\<br /> &amp; = P(Y \le arccos(x))<br /> \end{align}<br />

But I'm stuck on the next step. I found a similar walkthrough online for arcsin, but I don't understand the step they take at this point either. Any pointers would be appreciated.
 
Physics news on Phys.org
It's not clear exactly what the problem is here as you've provided contradictory information.

Do you have a random variable X which is uniformly distributed and you are trying to find the PDF of Y=arccos(X)? This is what you wrote in words sounds like.

Or do you have a random variable Y which is uniformly distributed and you are trying to find the PDF of X=cos(Y)? What you wrote in notation suggests this.
 
Sorry that it is unclear. I have a random variable Y which is uniformly distributed, and I am interested in the PDF of X, given that:

<br /> X = cos(Y)<br />

Does that clarify?
 
Over what range of values is Y distributed?
 
Y is uniformly distributed between [0, 2∏)
 
Try looking at a plot of x=cos(y) to deduce the PDF for X. If x=-1/2, for example, what portion of the graph would satisfy that? To what interval of y would this correspond to?
 
thapyhap said:

Homework Statement



I want to find the PDF for arccos and arcsin of a uniform random number. Given:

<br /> Y\sim\mathcal{U}(0,2\pi) \\<br /> X = cos(Y)<br />

The Attempt at a Solution



I started with trying to find the CDF:

<br /> \begin{align}<br /> F_X&amp; = P(X \le x) \\<br /> &amp; = P(cos(Y) \le x) \\<br /> &amp; = P(Y \le arccos(x))<br /> \end{align}<br />

But I'm stuck on the next step. I found a similar walkthrough online for arcsin, but I don't understand the step they take at this point either. Any pointers would be appreciated.

The function ##\cos(y)## is strictly decreasing on the y-interval ##[0,\pi]## and strictly increasing on ##[\pi,2\pi]##. Therefore, your statement that ##P(cos(Y) \leq x) = P(Y \leq \arccos(x))## may not be true. You need to think about this more carefully.
 
  • Like
Likes 1 person
thapyhap said:

Homework Statement



I want to find the PDF for arccos and arcsin of a uniform random number. Given:

<br /> Y\sim\mathcal{U}(0,2\pi) \\<br /> X = cos(Y)<br />

The Attempt at a Solution



I started with trying to find the CDF:

<br /> \begin{align}<br /> F_X&amp; = P(X \le x) \\<br /> &amp; = P(cos(Y) \le x) \\<br /> &amp; = P(Y \le arccos(x))<br /> \end{align}<br />

It is not the case that \cos(y) \leq x if and only if 0 \leq y \leq \arccos(x); in fact, since \cos(y) is decreasing on [0, \pi], if y \leq \arccos(x) then \cos(y) \geq x.

Remember that \cos(y) = \cos(2\pi - y) but 0 \leq \arccos(x) \leq \pi for all x \in [-1,1].
 
  • Like
Likes 1 person
Thanks for all of your replies. All of your points make sense, but I'm still not sure how to proceed.

MdMTHsH.png


It's obvious that:

<br /> \begin{align}<br /> P(X\le1)&amp;=1 \\<br /> P(X\le0)&amp;=0.5 \\<br /> P(X\le-1)&amp;=0 \\<br /> \end{align}<br />

It's also clear that the CDF will be the same for both sin(Y) and cos(Y) since it does not depend on the phase, only on the range of Y. I have no idea how to calculate, for example, P(X ≤ 0.5). I feel like I'm missing something really obvious.
 
  • #10
Take a look at this plot (which is of sine, not cosine, but it's the same idea). Does this help? The red portion of the domain corresponds to the green part of the graph. I plotted it in units of ##\pi## on the horizontal axis.
 

Attachments

  • plot.png
    plot.png
    2.6 KB · Views: 599
  • Like
Likes 1 person
  • #11
I'm not sure- I still feel like I'm missing something simple. Looking at the sin plot I can see a geometric solution as follows:

KdC3ZGG.png


A_1=y(\pi-2\sin^{-1}y)

TD3ZTmw.png


<br /> \begin{align}<br /> A_2&amp;=2\int^{\sin^{-1}y}_0 \sin x \,dx \\<br /> &amp;=2\left[ \cos 0 - \cos(\sin^{-1} y) \right] \\<br /> &amp;=2\left( 1 - \sqrt{1-y^2} \right)<br /> \end{align}<br />

5Q4YqPU.png


<br /> A_3 = 2<br />

Now I have that P(Y \le y) = \frac{A_1 + A_2 + A_3}{4}, but this doesn't seem to simplify to anything and I have the feeling there is a much simpler approach. I'm also not sure how to put it all together, considering that I have to rejigger everything if y \lt 0.
 
  • #12
Take your three pictures together, one sine graph and the three blue regions shaded. Look at the x values where the blue touches the x axis. Call that set ##S##. You want the probability that ##x\in S##, which isn't that hard to calculate since ##X## is uniform. You really have only two cases to consider, when y is above the axis and below it. And the cosine problem is even easier because of the symmetry.

Remember that ##\arcsin(y)## is the x value just less than 1 in your picture. You can express everything in terms of that using symmetry.
 
  • Like
Likes 1 person
  • #13
Great, I see it now! Finally, I have:

<br /> \begin{align}<br /> F_Y(y) &amp;= \frac{\pi - \cos^{-1}{y}}{\pi} \\<br /> &amp;= \frac{\frac{\pi}{2} + \sin^{-1}{y}}{\pi}<br /> \end{align}<br />

Which gives me:
<br /> f_Y(y) = \frac{1}{\pi \sqrt{1 - y^2}}<br />

Thanks so much for all of your help and patience.
 
Last edited:
Back
Top