| Line 12: |
Line 12: |
| | | | |
| | In this diagram, weights are hung at the 1, 9, and 11 inch marks. The average of 1, 9, and 11 is 7. The ruler will balance if it is hung at the 7 inch mark. This can be considered as an example of an "analog computer" for the average. | | In this diagram, weights are hung at the 1, 9, and 11 inch marks. The average of 1, 9, and 11 is 7. The ruler will balance if it is hung at the 7 inch mark. This can be considered as an example of an "analog computer" for the average. |
| | + | |
| | + | ==Weighted averages== |
| | + | A ''weighted average'' is an average in which some of the items of the group count or weigh more than others. |
| | + | |
| | + | One way to do this is to repeat an item or include it more than one time in the calculation of the average. |
| | + | For example, consider the ruler diagram above. Imagine that we hang ''ten'' weights at the 11" mark. Instead of |
| | + | :(1 + 9 + 11) / 2 = 7, |
| | + | it is now |
| | + | :(1 + 9 + 11 + 11 + 11 + 11 + 11 + 11 + 11 + 11 + 11 + 11) / 12 = 10 |
| | + | Giving extra "weight" to one of the items moves the average closer to the items with more weight. |
| | + | In this case, we put ten weights at the 11" mark and added it in ten times. But we could have hung one ''heavier'' weight at the 11" mark. That weight could be 2.5 or 8.6 or 16.184 times as much as the others. When we used ten weights, we could have written the calculation for the average this way: |
| | + | :(1·1 + 1·9 + 10·11) / (1 + 1 + 10) |
| | + | When the weights are not integers, we do the calculation the same way. Instead of a sum, we use a weighted sum, in which each item is multiplied by a weighting factor; when we do the division, we divided by the sum of all the weights instead of the count of all the items. |
| | + | An example of a case where a weighted average is appropriate: suppose I gas my car every Monday. Suppose that during one month price of gas is $2.00 per gallon the first week, $2.20 the second week, and $2.40 the third week, and $2.20 the fourth week. A newspaper report might say that the average price of gas for the month is the average of those four numbers: |
| | + | :($2.00 + $2.20 + $2.40 + $2.20) / 4 = $2.20. |
| | + | But the average price of the gas ''I bought'' depends on how much gas I buy each week. For me, the average price of gas is the price of gas each week ''weighted by'' the amount of gas I actually bought each week. |
| | + | |
| | + | For example, suppose that I did almost no driving on the first, second, and fourth weeks, and bought only one gallon because (for some reason) I wanted to keep the tank topped up, but that on the third week I was on vacation, took a drip, and used ten gallons. Since I did almost of my driving on the third week, the price of the gas '''I''' bought is going to be dominated by that third week. It is going to be close to $2.40 per gallon. If I hadn't bought any gas at all on the first, second, and fourth weeks, the price of gas on those weeks wouldn't have mattered at all. As it is, they don't vary very much. |
| | + | |
| | + | If I look at the four receipts at the end of the month, I see: |
| | + | :First week: 1 gallon at $2.00 per gallon, total $2.00 |
| | + | :Second week: 1 gallon at $2.20 per gallon, total $2.20 |
| | + | :Third week: 10 gallons at $2.40 per gallon, total $24.00 |
| | + | :Fourth week: 1 gallon at $2.20 per gallon, total $2.20 |
| | + | |
| | + | At the end of the month, I've spent a total of $30.40 and I've bought a total of 13 gallons of gas, so the average price of the gas ''I'' bought is $30.40/13 = $2.34 per gallon: |
| | + | |
| | + | :(1·2.00 + 1·2.20 + 10·2.40 + 1·2.20) / (1 + 1 + 10 + 1) = 2.34 |
| | + | |
| | | | |
| | [[category:Mathematics]] | | [[category:Mathematics]] |