|


Averaging Two AnglesDate: 06/08/99 at 18:05:55 From: Dave VanHorn Subject: The average of two angles How do you take the average of two or more angles? The average of 179, 180, and 181 is 180, but the average of 359, 0, and 1 is not 180.
Date: 06/09/99 at 09:09:14
From: Doctor Peterson
Subject: Re: The average of two angles
Hi, Dave.
To find an average, or mean, of a set of numbers, you add up the
numbers and then divide by the number of numbers you added. In your
examples, there are three numbers, so you divide the sum by 3:
179+180+181 540
----------- = --- = 180
3 3
359+0+1 360
------- = --- = 120
3 3
- Doctor Peterson, The Math Forum
http://mathforum.org/dr.math/
Date: 06/09/99 at 11:27:15 From: Dave VanHorn Subject: Re: The average of two angles Right, but that does NOT take the average of three ANGLES. The average of the three angles in the second example should be 0.
Date: 06/09/99 at 12:50:10
From: Doctor Peterson
Subject: Re: The average of two angles
Hi, Dave. I missed your point because you'd written 180 instead of
120.
I think it might be helpful if you gave me some context - why do you
want the average? The meaning will be different in certain kinds of
problems, depending for instance on whether you are looking at the
angles as a turn through 359 degrees, or as a direction 359 degrees
from north.
As you stated the question, I would still just average the numbers, as
I did. If something turns, say, 359 degrees to the left in the first
hour, stays stationary in the second hour, and turns 1 degree to the
right in the third hour, then on average it has turned 120 degrees per
hour. Presumably there is a reason for giving the angle as 359 rather
than as -1 degree; in the latter case, of course, the average would be
zero. In this sense, there is a difference between -1 and 359 degrees.
But you've raised an interesting question: if we think of the angles
just as directions, then 359 and -1 should mean the same thing, and
the average should not depend on how I state it. This is an inherent
problem with angles, and this ambiguity shows up in other places,
notably in working with complex numbers, where for example we divide
an angle by 3 to find the cube root, and there are actually three
answers 120 degrees apart, much as in this problem.
Let's look at your problem in terms of wind direction. Suppose the
wind is blowing at a constant speed, but one day it blows from 359
degrees, the next from 0 degrees, and the next from 1 degree. What is
the average wind direction? If the answer isn't 0 degrees, something's
wrong.
I would approach this in terms of vectors. The wind velocities can be
represented by vectors
V1 = (V cos(359), V sin(359)) = (0.99985V, -0.0175V)
V2 = (V cos(0), V sin(0)) = (1, 0)
V3 = (V cos(1), V sin(1)) = (0.99985V, 0.0175V)
Now if we add these vectors and divide by 3, we get
(V1+V2+V3)/3 = (2.99970/3, 0) = (0.99990, 0)
and this vector has direction
tan^-1(0) = 0 degrees
as expected. We can also see that because the wind turned, the average
strength in this direction is a little less than 1. If you haven't
seen vectors or trigonometry yet, this may suggest how valuable they
are!
I hope this helps a little; as I said, in different contexts the
meaning of "average angle" will be different. Let me know if you have
yet another interpretation.
- Doctor Peterson, The Math Forum
http://mathforum.org/dr.math/
Date: 06/09/99 at 13:17:48 From: Dave VanHorn Subject: Re: The average of two angles This is what I was looking for. I had forgotten the name. The Tan^-1 is Hyperbolic, or ? Date: 06/09/99 at 13:22:59 From: Doctor Peterson Subject: Re: The average of two angles Hi, Tan^-1 means inverse tangent, also called "arc tangent," and is "the angle whose tangent is ...." Hyperbolic tangent is something else that you probably don't really want to know about (but you can look it up in our archives if you do.) I'm glad I figured out what you wanted. - Doctor Peterson, The Math Forum http://mathforum.org/dr.math/ Date: 06/09/99 at 13:29:45 From: Dave VanHorn Subject: Re: The average of two angles Thanks, I knew there had to be a way to do this. Date: 04/19/2003 at 13:32:11 From: Larry Subject: Averaging angles I tried using the method you give; however, I get a close answer, but usually not an exact answer. For instance when I average 5 degrees and 15 degrees, the average should be 10 degrees, but instead I obtain 9.814 degrees. I used the scientific calculator that comes with Windows Office Professional software, which is accurate to 33 places. Being almost 0.2 degrees is significant as compared to the correct answer. Having a calculator that has tables correct to 33 places makes me believe that the answer should be more accurate than this. Maybe there is a problem with the tables in the calculator that I am using. If so, is there calculator that is more accurate?
Date: 04/19/2003 at 22:54:32
From: Doctor Peterson
Subject: Re: Averaging angles
Hi, Larry.
The method given above can be put into a formula this way:
sum of sines of angles
A = arctan ------------------------
sum of cosines of angles
For your example, we have
sin(5) + sin(15) 0.08716+0.25882 0.34597
---------------- = --------------- = ------- = 0.17633
cos(5) + cos(15) 0.99619+0.96593 1.96212
A = arctan(0.17633) = 10
I presume you did something different; if you want help to see what you did
wrong, please tell me how you tried to apply the method there.
I should mention for completeness that the arctan (inverse tangent)
always gives an answer between -90 and +90 degrees, so if the angles
you are working with are outside that range, you will have to adjust,
by finding the angle in the correct quadrant that has the indicated
tangent.
If you have any further questions, feel free to write back.
- Doctor Peterson, The Math Forum
http://mathforum.org/dr.math/
Date: 06/19/2003 at 08:15:42 From: Stephen. Subject: Averaging Two Angles If you're writing a program or spreadsheet to do this, atan2 is a better choice than atan, as it gets the signs correct automatically. Date: 06/19/2003 at 09:00:29 From: Doctor Peterson Subject: Re: Averaging Two Angles Hi, Stephen. That's true, though the person who wrote was using a calculator. If you were using a programming language or spreadsheet program that supports the "atan2" function, for which atan2(x,y) = arctan(y/x) with the appropriate sign according to the quadrant of the coordinates, then a better formula would be A = atan2(sum of cosines, sum of sines) Be careful, however: the definition above is for Excel; in C++, it's atan2(y, x), with the order of arguments reversed. The function is not quite standard everywhere. For more about arctan and atan2, see: Arctan and Polar Coordinates http://mathforum.org/library/drmath/view/54114.html - Doctor Peterson, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]


Ask Dr. MathTM
© 1994-2011 The Math Forum
http://mathforum.org/dr.math/