Help? Inverse factorial?
"43fan" wrote...
That's just it, that's what I want the spreadsheet/program to figure for
me... the percentage breakdown. I suppose I could write it in Foxpro and
use a whole lot of If or Case statements, but I'd think there'd be a
mathematical formula to do it.
In most cases, the payout will be 1 in 4, IOW if there are 100 entrants,
there'll be 25 places paid. I'd like to be able to set the amount for the
1st place manually, so then would need the remaining amount divided among
the rest of the people. Say the prize fund was $1500, I'd set 1st place to
pay $500, then divide the $1000 among the rest of the people.
...
The point is that there are an infinite number of possible ways to create a
decreasing finite sequence of percentages that sum to 100%. No program can
decide which one to use. That's up to you, the party in the process who's
presumably capable of independent thought and decision making. You can't
delegate it to the computer.
Your earlier example was a $100 total payout divided as $50 to 1st place, $25 to
2nd place, $15 to 3rd place and $10 to 4th place. That could be accomplised most
simply as 1/2 of what's left to the next place until you reach the final two
places, at which point you want to split what remains roughly two-to-one in
favor of the higher placing of the two rounded *down* to some base increment
($5). If that's acceptable, then enter the total payout in a cell named TPO.
Enter the base increment in a cell named INC. Create a list of the places which
will receive prizes in ascending order (so 1st place topmost) and name it POL.
In the cell immediately to the right of POL enter the simple formula
=TPO/2
Then in the cell below that enter the formula
=IF(ROW()-CELL("Row",POL)<ROWS(POL)-2,(TPO-SUM(OFFSET(POL,0,1,SUM(ROW()
-CELL("Row",POL)),1)))/2,IF(ROW()-CELL("Row",POL)<ROWS(POL)-1,ROUNDDOWN(
ROUNDUP((TPO-SUM(OFFSET(POL,0,1,SUM(ROW()-CELL("Row",POL)),1)))*2/3,0)
/INC,0)*INC,TPO-SUM(OFFSET(POL,0,1,ROW()-CELL("Row",POL),1))))
Select this cell and fill it down so that all cells to the right of POL contain
formulas. This doesn't handle ties.
If you want arbitrary payouts to the 1st place finisher (i.e., an arbitrary % of
TPO), then the simplistic approach would be to adapt the larger formula.
=IF(ROW()-CELL("Row",POL)<ROWS(POL)-2,(TPO-SUM(OFFSET(POL,0,1,SUM(ROW()
-CELL("Row",POL)),1)))*OFFSET(POL,0,1,1,1)/TPO,
IF(ROW()-CELL("Row",POL)<ROWS(POL)-1,ROUNDDOWN(ROUNDUP((TPO-SUM(
OFFSET(POL,0,1,SUM(ROW()-CELL("Row",POL)),1)))*2/3,0)/INC,0)*INC,TPO
-SUM(OFFSET(POL,0,1,ROW()-CELL("Row",POL),1))))
But that has problems when the 1st place % of TPO is less than 50%, in which
case the formula could give the second to last place entry more than the next
higher (third to last) placing entry. There are ways to deal with this by
expanding the ad hoc handling of the lowest placing finishers to include the
lowest 3, 4 or more, but it gets messy quickly. And if there are N entries in
POL, then the 1st place entry can't have a % of TPO less than 1/N unless some
lower placing finishers receive more. Probably the best way to approach variable
payouts is to specify the payouts for 1st place and the lowest place, then pick
a decreasing function to interpolate between the two, and spread any rounding
errors between the intermediate places in POL.
Like it or not, what you want to do isn't easy to do. It involves difficult
trade-offs which *YOU* must decide upon. If that's too much work for you, that's
just your bad luck.
--
Never attach files.
Snip unnecessary quoted text.
Never multipost (though crossposting is usually OK).
Don't change subject lines because it corrupts Google newsgroup archives.
|