A Weighted Distribution ---by Gregg W. Taylor report in which they needed to sum to 100%, but ¢ didn't? Have you ever had to distribute a sum of money in a particular way, but the pieces didn't quite add to the whole? This arfide will be devoted to a method of assuring that the desired sum is attained. The data we need to make the distribution are the amount (AM/') we want to distribute and the weighting factors (WFACS). T h e result we want to obtain (Z) is a set of values that sum to AM~' and are in the same proportion as the values in [dFACS. Syntactically, our function (DISTRIBU2E) will look like this: Z~AMT DIS2RIBUTE WFACS T h e n use them to apportion the whole amount: Z*AMTÃNORM There is one thing wrong with the above. Suppose W F A C S sums to zero, or very d o s e to zero. We need an early exit from D I S / , R I B U / ' E in this case. However, if we set Z to be all zeros, this will violate our requirement that the result sums to AM/'. If
/lp/association-for-computing-machinery/a-weighted-distribution-8l8HHP1CUV