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 sum of random vectors

  1. Mar 27, 2014 #1
    I am trying to derive the distribution for the sum of two random vectors, such that:

    X &= L_1 \cos \Theta_1 + L_2 \cos \Theta_2 \\
    Y &= L_1 \sin \Theta_1 + L_2 \sin \Theta_2


    L_1 &\sim \mathcal{U}(0,m_1) \\
    L_2 &\sim \mathcal{U}(0,m_2) \\
    \Theta_1 &\sim \mathcal{U}(0, 2 \pi) \\
    \Theta_2 &\sim \mathcal{U}(0, 2 \pi)

    In other words, two vectors, each with a uniformly random direction, and each with a magnitude uniformly random between zero and [itex]m_1[/itex] or [itex]m_2[/itex], respectively. Is this even worth trying to calculate analytically?

    I've tried to break the problem down into simpler parts. First, I calculated the PDF of [itex]S_1 = \cos \Theta_1[/itex] as:

    f_{S_1}(s_1) = \frac{1}{\pi \sqrt{1 - {s_1}^2}}

    Then I thought, if we ignore [itex]L_1[/itex] and [itex]L_2[/itex], how can I find the PDF of [itex]S_1 + S_2 = \cos \Theta_1 + \cos \Theta_2[/itex]? I thought I could try multiplying the characteristic functions of [itex]S_1[/itex] and [itex]S_2[/itex], so I tried taking the Fourier transform of [itex]f_{S_1}(s_1)[/itex] in both MATLAB and Mathematica, but MATLAB just choked on it, and Mathematica returns something involving the Henkel function which looks too complex to use.

    On Wikipedia I found something called the Arcsine distribution, which has a CDF similar to [itex]F_{S_1}[/itex]. This is a special case of the Beta distribution, which Wikipedia does give the characteristic function for, but I'm not sure I can use it given that the CDF for the Arcsine distribution is slightly different than mine. However, this leads me to believe that the characteristic function for [itex]S_1[/itex] is tractable.

    I really don't know anything about probability, I'm just reading Wikipedia and trying to make some sense of this problem. I would really appreciate someone telling me where to look next, or at least that what I'm trying to do is analytically impossible!
  2. jcsd
  3. Mar 27, 2014 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Do you not know the rules for adding and multiplying probability density functions?
    [edit]... hmmm, I think I misread: you are finding the distribution of the final values from adding 4 random numbers together.

    found a discussion that may have some leads for you...
    ... I'll have to think some more.

    Basically: the probability distribution of the sum of two or more independent random variables is the convolution of their individual distributions.
    Last edited: Mar 27, 2014
  4. Mar 28, 2014 #3
    Perhaps it's easier to consider (X,Y) in polar coordinates, e.g. symmetry arguments show that the angle of (X,Y) is uniformly distributed. The magnitude is a little trickier but, say, the cdf of X^2+Y^2 could be written as a triple integral of an indicator function and then simplified somewhat.
    Last edited: Mar 28, 2014
  5. Mar 28, 2014 #4
    Yeah, but the convolution of two distributions is the sum of their characteristic functions, i.e., the Fourier transform of their PDFs. Mathematica gave me a nice solution for this today. For [itex]Z = \cos \Theta_1 + \cos \Theta_2[/itex]:


    Where [itex]K(k)[/itex] is the complete elliptic integral of the first kind.

    Could you elaborate a bit more? I am not sure I see how this ends up simplifying things, it seems like I would have to do all the same calculations to get the magnitude. I can't find a nice way to calculate the distribution of [itex]L_1 \cos \Theta_1[/itex]- Wikipedia has an article on calculating the product of distributions, which I thought would be easy considering that the PDF of a uniform random distribution is so simple, but I didn't really understand the calculus.

    The article gives the PDF of [itex]Z = XY[/itex], for two random variables [itex]X[/itex] and [itex]Y[/itex], with PDFs [itex]f_X[/itex] and [itex]f_Y[/itex]:

    f_Z(z) = \int f_X(x) f_Y\left(\frac{z}{x}\right) \frac{1}{|x|}\, dx

    So I tried working it as follows, with [itex]Z=L_1 \cos \Theta_1[/itex]:

    f_Z(z) &= \int \frac{1}{\pi\,m_1\,\left|x\right|\sqrt{1-(\frac{x}{z})^2}}\, dx \\
    &= \frac{\log (x)-\log \left(\sqrt{\frac{z^2-x^2}{z^2}}+1\right)}{\pi m_1}

    What does it mean that this is still a function of [itex]x[/itex]? I have no clue what to try next.
  6. Mar 28, 2014 #5
    Standard convolution formulas are not likely to be of much use for this approach because X and Y are dependent.

    Also don't worry about the PDF just yet, it's trivial to calculate (if it exists) once you've got the CDF.

    A CDF can be written as the expected value of a Boolean indicator function, which for this example will be a 4d integral, and if you consider the squared magnitude like I suggested this can be simplified to a 3d integral by symmetry arguments (or a 1d integral for the case L1=L2=1).

    Symmetry arguments again show that the magnitude and angle are independent, but, if you must, you can calculate the joint PDF of X and Y by differentiating the cdf and using a transformation from polars back to Cartesians.
  7. Mar 29, 2014 #6

    Stephen Tashi

    User Avatar
    Science Advisor

    I'm curious whether using the PDF will give a 2 variable integration in a straightforward way.

    Since the density function has the same value at all points on a circle of radius R, we may as well compute that value at the point (x = R, y = 0).

    To break down how the sum of two vectors can land at (R,0) we can consider the vertical lines through points on the x-axis. There is an interval [x_min, x_max] where it is possible for the end of the first vector to land on the vertical line through a point (x1,0) with x1 in that interval. The values of x_min,x_max are a function of m1,m2,R. On such a vertical line, there is an interval [y_min, y_max] for the values y1 where the endpoint of the first vector can land at (x1,y1) and still allow the second vector to go from (x1,y1) to (R,0). These bounds are a function of x1, m1, m2,R.

    The bounds [x_min, x_max] together with the bounds [y_min, y_max] determine some sort of geometric figure (not a rectangle since y_min and y_max are functions of x1.

    If we knew the Joint density J_cartesian of (x1,y1,x2,y2) ( with (x2,y2) representing the components of the second vector) we could integrate J_cartesian(x1,y1,R-x1,-y1) over the above geometric figure as a double integral in the variables x1,y1. (At least that's my intuition - granted it's dangerous to reason about problems using PDFs.)

    Since we don't know J_cartesian(x1,y1,x2,y2), we can use a change of variables that expresses the vectors (x1,y1), (R-x1,-y1) in polar coordinates. In polar coordinates, the joint density J_polar(L1,theta1,L2,theta2) is just the product of 4 constants The complications come from writing the bounds of integration in terms of the polar variables and in the "volume element" introduced by the change of variables. (It looks like we would be using a 2D "area element" since J_polar is evaluated as a function of only two variables - Is that correct?)

    (As an aside, the endpoint of the first vector won't land uniformly distributed over the area of a circle of radius m1. The first vector isn't "a random vector" in that sense of "random".)
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: PDF of sum of random vectors
  1. Randomly truncated pdf (Replies: 7)