1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

PDF of arccos and arcsin of a uniform random number

  1. Mar 26, 2014 #1
    1. The problem statement, all variables and given/known data

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

    [tex]
    Y\sim\mathcal{U}(0,2\pi) \\
    X = cos(Y)
    [/tex]

    3. The attempt at a solution

    I started with trying to find the CDF:

    [tex]
    \begin{align}
    F_X& = P(X \le x) \\
    & = P(cos(Y) \le x) \\
    & = P(Y \le arccos(x))
    \end{align}
    [/tex]

    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.
     
  2. jcsd
  3. Mar 26, 2014 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    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.
     
  4. Mar 26, 2014 #3
    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:

    [tex]
    X = cos(Y)
    [/tex]

    Does that clarify?
     
  5. Mar 26, 2014 #4

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Over what range of values is Y distributed?
     
  6. Mar 26, 2014 #5
    Y is uniformly distributed between [0, 2∏)
     
  7. Mar 26, 2014 #6

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    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?
     
  8. Mar 26, 2014 #7

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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.
     
  9. Mar 26, 2014 #8

    pasmith

    User Avatar
    Homework Helper

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

    Remember that [itex]\cos(y) = \cos(2\pi - y)[/itex] but [itex]0 \leq \arccos(x) \leq \pi[/itex] for all [itex]x \in [-1,1][/itex].
     
  10. Mar 26, 2014 #9
    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:

    [tex]
    \begin{align}
    P(X\le1)&=1 \\
    P(X\le0)&=0.5 \\
    P(X\le-1)&=0 \\
    \end{align}
    [/tex]

    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.
     
  11. Mar 26, 2014 #10

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    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.
     

    Attached Files:

  12. Mar 26, 2014 #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

    [tex]A_1=y(\pi-2\sin^{-1}y)[/tex]

    TD3ZTmw.png

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

    5Q4YqPU.png

    [tex]
    A_3 = 2
    [/tex]

    Now I have that [itex]P(Y \le y) = \frac{A_1 + A_2 + A_3}{4}[/itex], 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 [itex]y \lt 0[/itex].
     
  13. Mar 26, 2014 #12

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
  14. Mar 27, 2014 #13
    Great, I see it now! Finally, I have:

    [tex]
    \begin{align}
    F_Y(y) &= \frac{\pi - \cos^{-1}{y}}{\pi} \\
    &= \frac{\frac{\pi}{2} + \sin^{-1}{y}}{\pi}
    \end{align}
    [/tex]

    Which gives me:
    [tex]
    f_Y(y) = \frac{1}{\pi \sqrt{1 - y^2}}
    [/tex]

    Thanks so much for all of your help and patience.
     
    Last edited: Mar 27, 2014
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: PDF of arccos and arcsin of a uniform random number
  1. Random Number (Replies: 2)

  2. Proof of Arccos (Replies: 11)

Loading...