Statistics - Finding standard deviation of an angle

AI Thread Summary
The discussion focuses on deriving the standard deviation of the heading angle between two points based on their north and east position uncertainties and covariances. The main formula for heading is given as atan2(-d_e, -d_n), with attempts to calculate the standard deviations for east and north distances using the covariance values. Participants express uncertainty about how to determine the covariance for the atan2 function and how to apply the rules of error propagation. The conversation emphasizes the need to consider the covariance between the uncertainties of the distances when calculating the overall uncertainty in the heading angle. Understanding these relationships is crucial for accurate statistical analysis in this context.
9988776655
Messages
46
Reaction score
0

Homework Statement


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.

Homework 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

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:
Physics news on Phys.org
9988776655 said:

Homework Statement


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.

Homework 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

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)

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
 
Dont know how to get the covariance of atan2(something)
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:
http://dont%20know%20how%20to%20get%20the%20covariance%20of%20atan2%28something%29/ that according to the definition of covariance
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:
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.

--

9988776655 said:
not sure what covariance should be
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:
dx and dy are the uncertainties themselves !
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.
 
Sorry for the casual (but somewhat overlapping) notation. I'll make it worse with a qualitative story later on. Have to work first ...
 
9988776655 said:
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.
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:
As per the first post:
s_e = \sqrt{s_{e1}^2 + s_{e2}^2 – 2*cov_{e1e2}}\\s_n = \sqrt{s_{n1}^2 + s_{n2}^2 – 2*cov_{n1n2}}

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

Using BvU's forumula:
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}

Then:
(\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})

If one point is assumed perfectly known as given by the question, arecov_{d_ed_n} and cov_{n1n2} and cov_{e1e2} 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:
  • #10
9988776655 said:
Usually, uncertainties are reported as x +- y
Yes. I wrote ##\ x\pm\Delta x\ ##; however, here there are more results and the uncertainties are not independent.

If one point is assumed perfectly known as given by the question
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.

As per the first post:
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 let's ##\ \ 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 !​

--
 
Back
Top