Statistics - Finding standard deviation of an angle

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
9 replies · 5K views
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
 
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.
 
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:
[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:
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 !​

--