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 angle formed by two normal random variables

  1. Apr 13, 2013 #1
    Hi Everyone!
    I have two normally distributed random variables. One on the x axis, the other on the y axis, like a complex normal random variable. I'm trying to find the pdf of the angle between a fixed point on the x-y plane(let's say point 1,0) and the vector formed by combining the two random variables.

    I tried starting with the pdf of x and y:
    p(x,y) =(1/(2πσ^2)) e^(-((x-μ_x)^2+(y-μ_y)^2)/(2σ^2))
    where σ is the standard deviation for both random variables
    μ_x is the mean for random variable x, and
    μ_y is the mean for random variable y

    Then, I converted to polar coordinates and integrated over all radii (negative infinity to infinity). Then, it seems like I should integrate from angles 0 to 2pi. However that last integration seems really hard. Does anyone know of another way to solve the pdf of the angle?

    In case anyone is curious what the two input random variables actually represent, they are output from an accelerometer
  2. jcsd
  3. Apr 13, 2013 #2


    User Avatar
    2017 Award

    Staff: Mentor

    The angle between the vector (0,1) and a random (x,y)? I think you can just use symmetry - every angle has the same probability.
  4. Apr 13, 2013 #3
    For example, if random variables x and y both have mean equal one then intuitively the mean of the random variable angle should be pi/4, because random variables x and y are going along the x and y axis respectively. Also if x has mean equal one and y has mean equal negative one, the mean of angle should be -pi/4. Hope this makes the question clearer.
  5. Apr 13, 2013 #4


    User Avatar
    2017 Award

    Staff: Mentor

    Oh sorry, I did not see the non-zero means of the variables.
    Why do you want to integrate over the angles? That is the distribution you want to get, I think.
    Do you want the expected angle? That needs some definition of "expected angle" first, as the angles wrap around (2pi=0). I think you can use symmetry again there, and the "expected angle" will just be the angle between your vector and the vector (μ_x,μ_y).
  6. Apr 13, 2013 #5

    Stephen Tashi

    User Avatar
    Science Advisor

    The distribution of the ratio of y/x of two independent normal random variables involves a mixture that includes a Cauchy distribution. The angle the vector (x,y) makes with the x-axis would be the arctangent (ATAN2) of that ratio. A prominent statistician says there are practical ways of dealing with the ratio of normal random variables. http://www.google.com/url?sa=t&rct=...sg=AFQjCNEgO1dvktreWiL-rt-ZPcS3K1FmYQ&cad=rja

    (I don't know how useful it is to transform his distributions by the inverse tangent.)
  7. Apr 13, 2013 #6
    Thanks for the link - this is a pretty cool-looking paper! I recognize the name, too: Marsaglia invented the polar method for generating pairs of standard normal pseudorandom numbers.

    It might be easier to represent the random point (X,Y) in polar coordinates (R,θ). I'd start by first choosing new coordinates so that the means of X and Y are both zero, then switching to polar coordinates. I'm not sure if that will help or not; sometimes new coordinates cause more problems than they solve.
  8. Apr 13, 2013 #7
    I considered integrating over 0 to 2pi to exclude redundant angles. Without that integration the PDF would be a sinusoid that continues forever, it wouldnt integrate to one, and therefore not a valid PDF. But I'm not sure this is a correct way to do it.

    Yes, I'm trying to find the PDF of angle between a fixed vector and vector(mean_x,mean_y)
  9. Apr 14, 2013 #8
    Thanks Everyone, I'll start with the method suggested by Stephen
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook