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!

Statistics - Finding standard deviation of an angle

  1. Nov 11, 2015 #1
    1. The problem statement, all variables and given/known data
    Find the formula for the standard deviation (s_h) of heading angle, given the north and east standard deviation of position of two points (s_n1, s_e2, s_n2, s_e2), each point's north-east covariance (s_cov_ne_1, s_cov_ne_2) and the north and east distance between them (d_n, d_e). Simplify the problem by assuming that point 1 is known and therefore has zero standard deviation. Heading is defined as the angle from north from position 1 to position 2.

    2. Relevant equations
    heading = atan2 (-d_e / -d_n) ← this is given in the question. (atan2 not atan squared)
    https://en.wikipedia.org/wiki/Propagation_of_uncertainty

    3. The attempt at a solution
    The east distance standard deviation is:
    s_e = sqrt ( s_e1^2 + s_e2^2 – 2*cov); (not sure what covariance should be)

    The north distance standard deviation is:
    s_n = sqrt ( s_n1^2 + s_n2^2 – 2*cov); (not sure what covariance should be)

    The standard deviation of (-d_e / -d_n) is:
    s_x = sqrt ( (-d_e / -d_n)^2 * ( (s_e/d_e)^2 + (s_n/d_n)^2 – 2*cov/(d_n*d_e) ) )
    (not sure what covariance should be)

    Dont know how to get the covariance of atan2(something)
     
    Last edited: Nov 11, 2015
  2. jcsd
  3. Nov 11, 2015 #2

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    atan2 (y, x) is a variant of the regular arctan function, which permits determination of the angle in all four quadrants, based on the signs of x and y individually:

    https://en.wikipedia.org/wiki/Atan2
     
  4. Nov 12, 2015 #3

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Differentiate that according to the definition of covariance and let the error propagate as usual , foundation under all this is the Taylor expansion.
     
    Last edited by a moderator: May 7, 2017
  5. Nov 12, 2015 #4
    According to Wikipedia it is required to use partial derivatives to differentiate atan2(y/x):
    d(atan2(y/x)) = -y / (x^2 + y^2) dx + x / (x^2+y^2) dy
    The rules for propagation are here: https://en.wikipedia.org/wiki/Propagation_of_uncertainty
    I can use the rules to propagate something^2 and something / something but how do I propagate dx or dy? There does not appear to be any rules for this.
     
    Last edited by a moderator: May 7, 2017
  6. Nov 12, 2015 #5

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    dx and dy are the uncertainties themselves !
    if the error in x is dx then the error in f(x) is ##{\delta f\over \delta x} \, dx## (a.k.a. ##f'\, dx## or ##f_x dx##)

    analogous with two variables: f = f(x,y) ##\rightarrow\ df = f_x dx + f_y dy\ \rightarrow df^2 = f_x^2 dx^2 + f_y^2 dy^2 + 2 f_x f_y dx dy##
    If x and y are uncorrelated, this last term drops out (expectation value = 0), but when the covariance is ##\ne## 0 it stays in.

    --

    You should now see from the above that the covariance is the expectation value of ##dx\,dy##.

    If your exercise mentions covariance, i should expect your textbook or lecture notes have something to say on that !:rolleyes:
     
    Last edited: Nov 12, 2015
  7. Nov 12, 2015 #6
    If I understand this correctly, because in my example x = -d_n (the distance in the north direction between two points) then
    dx = -1
    We had d(atan2(y/x)) = -y / (x^2 + y^2) dx + x / (x^2+y^2) dy
    To get the variance, would I just ignore dx and dy in this calculation?

    how to I combine the rules for to get -y/(x^2 + y^2) dx ?
    Only the basic rules are given in the wikipedia page.
     
  8. Nov 13, 2015 #7

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Sorry for the casual (but somewhat overlapping) notation. I'll make it worse with a qualitative story later on. Have to work first ...
     
  9. Nov 13, 2015 #8

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    If you are given ##\ x\pm \Delta x\ ## and ##\ y\pm\Delta y \ ## and ##\ f(x,y) \ ##then $$ \left (\Delta f \right )^2 = \left (\partial f \over \partial x\right )^2 (\Delta x)^2 + \left (\partial f \over \partial y\right )^2 (\Delta y)^2 + 2\, \left (\partial f \over \partial x\right )\left (\partial f \over \partial y\right ) (\Delta x)(\Delta y)$$ The ##dx## and ##dy## in post #4 and #5, the ##\Delta x## and ##\Delta y## in this post: they are your se and sn : the variations in the stochastic variables ##x## and ##y##, your de and dn. ## (\Delta x)(\Delta y)## is the covariance ## {\rm cov}_{xy}##.
     
    Last edited: Nov 13, 2015
  10. Nov 13, 2015 #9
    As per the first post:
    [tex]s_e = \sqrt{s_{e1}^2 + s_{e2}^2 – 2*cov_{e1e2}}\\s_n = \sqrt{s_{n1}^2 + s_{n2}^2 – 2*cov_{n1n2}}[/tex]

    Where:
    [tex]s_{n1}[/tex] = North standard deviation of position of point 1
    [tex]s_{n2}[/tex] = North standard deviation of position of point 2
    [tex]s_{e1}[/tex] = East standard deviation of position of point 1
    [tex]s_{e2}[/tex] = East standard deviation of position of point 2
    [tex]s_n[/tex] = Standard deviation of North distance between each point
    [tex]s_e[/tex] = Standard deviation of East distance between each point

    Using BvU's forumula:
    [tex]Let\\x = d_e\\y=d_n\\\triangle x \triangle y=cov_{xy}\\\triangle x=s_e\\\triangle y=s_n \\f=atan2(\frac{-d_e}{-d_n})\\\frac{\partial f}{\partial d_e} = \frac{d_n}{d_e^2 + d_n^2}\\\frac{\partial f}{\partial d_n} = \frac{-d_e}{d_e^2 + d_n^2}[/tex]

    Then:
    [tex](\triangle f)^2=(\frac{d_n}{d_e^2 + d_n^2})^2(s_e)^2+(\frac{-d_e}{d_e^2 + d_n^2})^2(s_n)^2+2(\frac{d_n}{d_e^2 + d_n^2})(\frac{-d_e}{d_e^2 + d_n^2})(cov_{d_ed_n})[/tex]

    If one point is assumed perfectly known as given by the question, are[tex]cov_{d_ed_n}[/tex] and [tex]cov_{n1n2}[/tex] and [tex]cov_{e1e2}[/tex] zero?

    Usually, uncertainties are reported as x +- y. (+- means plus or minus). Is y the standard deviation as given in my example? Does the same formula apply to any measurement of uncertainty?
     
    Last edited: Nov 14, 2015
  11. Nov 14, 2015 #10

    BvU

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes. I wrote ##\ x\pm\Delta x\ ##; however, here there are more results and the uncertainties are not independent.

    I would say ##\ s_{n1} = 0\ \ \& \ \ s_{e1} = 0\ ##, as well as ##\ s\_{\rm cov}_{ne1} = 0 \ ##.

    My perception is that the complicated situation is simplified as follows:

    upload_2015-11-14_14-18-22.png

    where the pink ellipse indicates that the covariance is > 0.

    I don't see a ##cov_{e1e2}##, a ##cov_{n1n2}## or a ##cov_{d_ed_n}## in the first post, only a ##\ s\_{\rm cov}_{ne1} \ ## (which is assumed to be zero) and a ##\ s\_{\rm cov}_{ne2} \ ##.

    The simplification lets ##\ \ s_e = s_{e2}\ \ ## and ##\ \ s_n = s_{n2}\ \ ## be the uncertainties in ##\ d_e\ ## and ##\ d_n\ ## and ##\ s\_{\rm cov}_{ne2} \ ## the covariance of these uncertainties. Still, the big "Then ##(\triangle f)^2=...##" expression is correct (when you substitute the given ##\ s\_{\rm cov}_{ne2} \ ## for ##\ cov_{d_ed_n}\ ## )

    -- and that ##\ s\_{\rm cov}_{ne2} \ ## is not zero !​

    --
     
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: Statistics - Finding standard deviation of an angle
  1. Standard deviation (Replies: 3)

Loading...