d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Figuring Out A Certain Number Aggregate Average? > Not Hw - Not Sure How To Do The Math
Add Reply New Topic New Poll
Member
Posts: 27,942
Joined: Nov 6 2006
Gold: 55,141.00
Mar 31 2015 09:28pm
So I'm trying to figure what I deem an aggregate average. What I mean is say I want an overall average for a price I sell something at (example below) I'm trying to figure out how to calculate the aggregate (weighted) average for the total group.


For example:

Say I am selling water from different water utilities (29 gallons total).

I have :

Utility 1 that sells 10 gallons at 10 cents each

Utility 2 that sells 5 gallons at 12 cents each

Utility 3 that sells 3 gallons at 13 cents each

Utility 4 that sells 4 gallons at 14 cents each

Utility 5 that sells 7 gallons at 17 cents each


How do I figure out the overall aggregate average for the cost of a gallon spread across all systems? I figure there is some type of formula for this, but am not aware of such.

I really appreciate any help. 20-50 fg for an accurate explanation of the formula, the name of the formula/mathematics, and perhaps an example of how you got your solution.

This post was edited by Blankey on Mar 31 2015 09:29pm
Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Mar 31 2015 10:32pm
What you need is probably a formula to compute the average value of a given sample.

sample { 5 , 6 , 10 } -> average value = ( 5 + 6 + 10 ) / 3 = 21 / 3 = 7
You simply add up all the values, then divide by the number of values (size of your sample).

In your case, the values are packed into different groups :

Quote (Blankey @ Apr 1 2015 04:28am)
Utility 1 that sells 10 gallons at 10 cents each


... means the value 10 appears 10 times. To add up those 10 values, you'll have to multiply : 10 * 10 = 100

do the same for the other values, and add up the results :

10*10 + 5*12 + 3*13 + 4*14 + 7*17 = 374

You've already figured out the size of your sample (total number of gallons) : 10 + 5 + 3 + 4 + 7 = 29

Finally : 374 / 29 ~ 12.9 cents

The average price for a gallon of water is $ 0.129
Member
Posts: 27,942
Joined: Nov 6 2006
Gold: 55,141.00
Mar 31 2015 11:01pm
Quote (feanur @ Apr 1 2015 12:32am)
What you need is probably a formula to compute the average value of a given sample.

sample { 5 , 6 , 10 } -> average value = ( 5 + 6 + 10 ) / 3 = 21 / 3 = 7
You simply add up all the values, then divide by the number of values (size of your sample).

In your case, the values are packed into different groups :



... means the value 10 appears 10 times. To add up those 10 values, you'll have to multiply : 10 * 10 = 100

do the same for the other values, and add up the results :

10*10 + 5*12 + 3*13 + 4*14 + 7*17 = 374

You've already figured out the size of your sample (total number of gallons) : 10 + 5 + 3 + 4 + 7 = 29

Finally : 374 / 29 ~ 12.9 cents

The average price for a gallon of water is $ 0.129



Just what I needed, thanks! -- Much more simple than I had thought (is there a mathematical term for that, or does aggregate average work?)

May pm for more assitance on the actual personal problem I'm working on, even if just to double check my results.
Member
Posts: 5,027
Joined: Oct 1 2007
Gold: 2,348.00
Apr 1 2015 02:04am
Quote (Blankey @ Apr 1 2015 05:01am)
is there a mathematical term for that, or does aggregate average work?


http://en.wikipedia.org/wiki/Expected_value

basically its just a "simple" average-calculation, but the formula shortens up things.

your raw-data is 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 17, 17, 17, 17, 17, 17, 17

if you count all elements you get the 29, feanur mentioned allready.
if you sum up all elements you get 374, as feanur mentioned too.

instead of adding up 10 + 10 + 10.... (10 times) you say 10*10
instead of adding up 12+ 12 + 12... (5 times) you say 10*5
and so on for 13, 14, 17
instead of counting your elements in your raw data you say: i know i got 10 elements of this kinde + 5 of this kinde + 3 of this + 4 of this + 7 of this. If i add them together i know how many elements there are over all.

hope you understand what i want to say (sorry for my bad english).

This post was edited by Wirbelschwein on Apr 1 2015 02:04am
Go Back To Homework Help Topic List
Add Reply New Topic New Poll