View Full Version : Absurd averaging problem
Zyada
11-24-1999, 03:55 PM
I have a user that wants me to calculate the average of a quantity for 16 days, then re-average that quantity for the whole month on the assumption that the quantity for the remaining days is equal to the average.
Now I think that the final result will be the same as the first average, & I'm going through a lot of pain for nothing.
After all:
n(avg(x1,...xn) = x1 + x2 + ... + xn
therefore
(n+y)(avg(x1,...xn) = x1 + x2 + ... + xn + y(avg(x1,...xn)
right?
Can you think of an easier way to express this?
Strainger
11-24-1999, 03:58 PM
If I'm interpreting your first sentence correctly, then yes, it would be the same as the first average. Toss a quarter to the user and tell him to go buy a clue.
pluto
11-24-1999, 04:54 PM
This reminds me of an old conundrum:
You are in a two-lap race around a one mile track. The first lap you average 30 mph. How fast do you have to go on the second lap to average 60 mph overall?
(Hint: It's not 90 mph!)
------------------
"If ignorance were corn flakes, you'd be General Mills."
Cecil Adams
The Straight Dope
metroshane
11-24-1999, 05:19 PM
30 mph
------------------
We live in an age that reads to much to be wise, and thinks too much to be beautiful--Oscar Wilde
Harmonious Discord
11-24-1999, 05:20 PM
zyada: I have a user that wants me to calculate the average of a quantity for 16 days, then re-average that quantity for the whole month on the assumption that the quantity for the remaining days is equal to the average.
Now I think that the final result will be the same as the first average, & I'm going through a lot of pain for nothing.
Please define your variables, if you are going to present formulas. Your explanation of what the client wants is not explicit either.
You can't assume that the first 16 days average is going to match the average for the last days of the month. The only way the client is right is if the last days of the month average exactly the same as the first 16 days. You can't do what the client wants, and do it the right way if I'm interperting correctly what you are trying to say.
NanoByte
11-24-1999, 06:18 PM
Yes, the OP has to be restated as a clear problem. It isn't coherent as stated.
I also don't understand why '90' isn't the answer to the second problem (which doesn't appear to related to the OP).
Ray
Lord Jim
11-24-1999, 06:35 PM
I read this and I'm not sure either what the customer would be asking for. If you have an average and use it for any number of other days and reaverage, it'll always be the same. What I thought he was asking on first reading was to take an average of the first half month then seed that back in and thake an average of the last half of the month to see if they were close to the same. Maybe looking to see if the sales force was making quota in the first half and playing golf for the last half.
Nano, it's a trick question. 60 mph for 2 miles takes 2 minutes. 30 mph for 1 mile takes 2 minutes. Second lap would have to be done in zero minutes.
Metroshane, I don't think so. Travelling both laps at 30 mph will simply mean that you've averaged 30 mph over the whole distance.
Lessee, I was trying to help Eldest Son with similar algebra problems last week.
.5(30mph) + .5(xmph)=1(60mph)
Is that right? Then solve for x
And that answer is 90.
I'm with NanoByte, I think the answer is 90 mph.
-Melin
-Melin
Greg Charles
11-24-1999, 06:38 PM
A little clarity here:
The answer to the original post is yes, the average would remain the same.
For the racing problem, it took two minutes to do the first lap. To do two laps at 60 MPH would take two minutes. Therefore the second lap must be done in no time at all, or infinitely fast.
Whoops -- went back and realized I had read the problem wrong. Let me redo it here.
1 mile at 30 mph, 1 mile at an unknown speed, and you have to cover 2 miles at an average of 60 mph.
1(30mph) + 1(xmph) = 2(60mph)
This time, solving for x . . .
30 + x = 120
x = 90
It's still 90. Isn't it? Or should I hire a tutor for Eldest Son?
-Melin
Well, it's STILL 90.
Ah shit. That's why I hire accountants.
-Melin
Gilligan
11-24-1999, 06:50 PM
One mile around the track at 30mph takes 2 minutes, or 120 seconds.
One mile around at 90mph takes 2/3 minutes, or 40 seconds.
Total = two miles in 160 seconds, or one mile in 80 seconds = 45 mph, not 60 mph.
Zyada
11-24-1999, 08:16 PM
I'll try to explain it better:
It's the 17th. I have barrels of oil produced by a well each day for the first through the 16th. The average for these days is 3 barrels per day. The user wants me to calculate an average for the whole month - setting the days that I don't have a value for yet to 3.
Is that better? (That wasn't sarcasm, I know I have a problem explaining myself at times. I talk much better in C than in english!)
And Strainger - if I tossed a quarter to every user that needed a clue, I'd be operating on negative salary!
Ringo
11-24-1999, 08:32 PM
That's one helluva well. So it's made 48 barrels in the first 16 days of the month and user wants to say the thing is going to make 90 or 93 BO. Right? As long as it doesn't sand up or water out or whatever.
Greg is right about the lap time - can't be done once you've finished the first lap w/an average of 30 mph.
Monty
11-24-1999, 08:34 PM
Strainger: instead of tossing a quarter to the clueless, I merely hand them a card from that deck which comes with the Clue! game.
Harmonious Discord
11-24-1999, 08:45 PM
So thre user wants to use a trend in analysing their future production, not get an actual average for that month. They want to predict what might be. Correct?
Spiritus Mundi
11-25-1999, 01:49 AM
Zyada, your user is an ass. If you assume all remaining entries will equal the arithmetic mean of the first 16 measurements, then the arithmetic mean will never shift. So, do the work he has asked for and charge him for the "effort" of performing both operations.
Melin.
It's still 90. Isn't it? Or should I hire a tutor for Eldest Son?
Yes.
NanoByte
11-25-1999, 02:55 AM
Melin, they're correct on your problem and also on the race track problem. You sided with the wrong person, or at least a person who was thinking wrong at the time. ;)
If you want to see the proper result from what should've been your last work with your equation, you should note that, in your equation, as it stands, you are multiplying miles times miles per hour in each term, which gives you miles2/hour. You should instead be equating the sum of the two times for the successive laps, in hours, to their total time, in hours; that is:
1 mi 1 mi 2 mi
-------- + ------ = --------
30 mi/hr x 60 mi/hr
1/x then = 0, or x = <font face="symbol">¥</font>
Thus you must run the second lap at infinite speed to get your overall average speed for the two laps up to 60 mph.
Ray (sort of ran off the track cutting corners)
NanoByte
11-25-1999, 03:02 AM
Anh! forgot about having to worry about the spacing in that equation. It's:
. 1 mi. . . 1 mi. . . 2 mi
-------- + ------ = --------
30 mi/hr . x mi/hr. 60 mi/hr
(Ignore all the '.'s in the equation.)
Ray
handy
11-25-1999, 09:26 AM
Reminds me of tv ads:
"past performance is not indicative of future earnings."
metroshane
11-25-1999, 10:36 AM
you guys are right, the 2 second lap has no time left to be completed.
I you want to go 1 mile at 60 mph then you have to do the whole mile in .0166 hours.
Well the first lap, .5 miles at 30mph took you .0166 hours, leaving no time left.
Unless, of course your talking low quantities of 1. (joke)
------------------
We live in an age that reads to much to be wise, and thinks too much to be beautiful--Oscar Wilde
Zyada, the user doesn't know what he's talking about. The averages will be the same. Here's the proof:
Assume a series of daily amounts, call the total of these amounts "T". Call the number of days "N". Call the daily average "X".
X = T/N
Now assume you want to project a new daily average for an additonal number of days "M" and you use the previously calculated value "X" as the assumed daily average for these days. We'll call this second daily average "Y".
Y = (T + MX)/(N + M)
The question is Y equal to X?
Y = (T + MX)/(N + M) {given above}
Y = (T + M(T/N))/(N + M) {substituting T/N for X}
Y = (T + MT/N)/(N + M) {multiplying the factors}
Y = (NT + MT)/N(N + M) {multiplying everything by N}
Y = T(N + M)/N(N + M) {seperating out T}
Y = T/N {dividing everything by (N + M)}
Therefore Y = X {both are equal to T/N}
Let xn = datum from day n
A = average of first n days
then
A = (x1+x2+ ... + xn)/n
Multiplying by n:
nA = x1+x2+ ... + xn
Now, your user wants you to assume xn+1, xn+2, etc. are the same as A. Adding A to the left side and xn+1 to the right gives:
nA + A = x1+x2+ ... + xn+xn+1
Factoring the left side:
(n+1)A = x1+x2+ ... + xn+xn+1
Dividing by n+1:
A = (x1+x2+ ... + xn+xn+1)/(n+1)
The right side is the formula for the average of the first n+1 data. The left is still A, the average of the first n. But it's also the average of the first n+1. And it will remain the average no matter how many new data are added in, as long as they're assumed to be equal to A.
Nickrz
11-26-1999, 10:40 AM
".. mathematical finagling that would constipate Einstein.."
Patricinus Scriblerus
11-26-1999, 01:27 PM
Ok maybe I am just not getting it here...
If you run a lap of a track (1 mile) at 30mph and you have to run 2 laps and have and average lap speed of 60mph where does the time factor come in?? or did I miss something?
The way I see it it breaks doen like this:
(30mph/2)+( X/2) =60mph right?
The average of 2 laps. So multiply both sides of the problem by 2 and you have:
30mph + x = 120mph solve for X
------------------
There are only two things that are infinite...the Universe and Man's stupidity...I'm not sure about the Universe though.
You are in a two-lap race around a one mile track. The first lap you average 30 mph. How fast do you have to go on the second lap to average 60 mph overall?
Patricinus Scriblerus: Ok maybe I am just not getting it here...
If you run a lap of a track (1 mile) at 30mph and you have to run 2 laps and have and average lap speed of 60mph where does the time factor come in?? or did I miss something?
The way I see it it breaks doen like this:
(30mph/2)+( X/2) =60mph right?
The average of 2 laps. So multiply both sides of the problem by 2 and you have:
30mph + x = 120mph solve for X
First, figure how long it will take to do one lap at 30 mph:
<code>Formula: Rate * time = distance(r1*t1=d1) </code>
(30 miles/hour)* t1=1 mile
Dividing by (30 mph) gives:
t1 = 1 mile/30 mph = 1/30 hr = 2 minutes
Now, figure how long it will take to do two laps at an average speed of 60 mph:
r2*t2=d2
(60 mph)*t2 = 2 miles
Dividing by (60 mph):
t2 = 2 miles/60 mph = 1/30 hour = 2 minutes
Now, the difference between t1 and t2 is the time you need to complete the second lap to make the whole trip's average speed 60 mph.
t2-t1 = 2 minutes - 2 minutes = 0 minutes.
Therefore, you have no time left to complete the second lap to make an average trip speed of 60 mph.
pluto
11-27-1999, 02:14 PM
zyada --
Sorry for hijacking your thread. I thought my puzzler was an old one that everyone knew, or at least it was pretty obvious once it was explained (It's taking longer than we thought).
But it looks like you got the answer you needed. Adding additional average data points to a computed average doesn't change the average.
------------------
"If ignorance were corn flakes, you'd be General Mills."
Cecil Adams
The Straight Dope
NanoByte
11-27-1999, 07:34 PM
Pat Scribble:
You set the problem up this way:
(30mph/2)+( X/2) =60mph right?
Right? No, wrong. Simply first note that you should be equating numbers of time units. If one lap = n miles, your time equation should be:
([i]n[/n] mi / 30 mi/hr) + (n mi / x mi/hr) = 2n / 60 mi/hr
The 'n's cancel out, of course. Then you have:
1/30 + 1/x = 2/60
Solving that for x,
x = <font size=3 face="symbol">¥</font>
Ray (Is it true that he who laps last cleans up?)
NanoByte
11-27-1999, 07:38 PM
Well, that first equation should've been:
(n mi / 30 mi/hr) + (n mi / x mi/hr) = 2n / 60 mi/hr
Ray
Lord Jim
11-27-1999, 08:39 PM
I'm with pluto, y'all are making this harder than it should be. It's like, Car1 goes around the track twice at 60mph it takes 2 minutes, Car2 goes once around the track at 30mph it takes 2 minutes. Now Car2, floor it and match Car1's time, oops, times up, sorry.
John W. Kennedy
11-28-1999, 11:26 AM
These are the errors:
1(30mph) + 1(xmph) = 2(60mph)
What is the first number? Miles? Then you're multiplying miles times miles per hour. That makes square-miles per hour. Bzzzzt!.
(30mph/2)+( X/2) =60mph right?
Since you've got mph/2 on one side of the equation and mph on the other, I suppose the 2 is an absolute number. So where did it come from? Where in the original problem does it say "divided by two"? Bzzzt!
The right setup is:
2miles/(1mile/30mph+1mile/xmph)=60mph
Checking the units:
miles/(miles/mph+miles/mph)=mph
miles/(miles/(miles/hours)+miles/(miles/hours))=miles/hours
miles/(miles(hours/miles)+miles(hours/miles))=miles/hours
miles/(hours+hours)=miles/hours
miles/hours=miles/hours
Good. Proceeding to the math:
2 / (1/30 + 1/x) = 60
1 / (1/30 + 1/x) = 30
(1/30 + 1/x) = 1/30
1/x = 0
x = 1/0
Ding!
Moral -- always check your units!
------------------
John W. Kennedy
"Compact is becoming contract; man only earns and pays."
-- Charles Williams
::leafing through the school directory checking for math tutors::
DSYoungEsq
11-29-1999, 05:06 PM
Getting back to averages, joke in today's comics section: Three statisticians go duck hunting. First statistician misses a duck too high, the second misses the duck too low. The third yells out, "It's a hit!"
As to the problem, getting the units right is what got me out of Physics in college <lol>.
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.