```Date: Feb 1, 2013 2:40 AM
Author: Jennifer Murphy
Subject: Help with discount function

I'm stuck. I've reached the limit of my meager math skills. I could usesome help.I am planning a little football pool for a Super Bowl party. Each personwill submit predictions for the score at the end of each quarter. I willconstruct a spreadsheet to calculate the winner.My plan is to award 10 points for each correct prediction and somethingless for incorrect predictions according to how close they are. Forexample, if the actual score is 14, a guess of 14 would get 10 points,13 or 15 might get 9 points, 12 or 16 might get 8, and so on.In this table, the points are discounted from a maximum of 10 by onepoint for each point of error (linear discount). Guess Points   Actual Score = 14   11     7   12     8   13     9   14    10   15     9   16     8   17     7I didn't like this method for a couple of reasons. (1) I don't wantnegative points, so all guesses that are off by more that 10 points getzero. (2) There is a one point penalty for missing by one point a scoreof 3 (33% error) and one of 50 (2%) error.An exponential decay function looked like a good choice. I chose to useit in the half-life form:   pts = MP * 2^(-error/h)Where:  pts   = The points to be awarded  MP    = The maximum points (10)  error = The error in the guess (abs(score-prediction))  h     = The half life parameter.When:  MP = 10  Actual Score = 0  h = 10.00The results are: Prediction  Error  Points      0        0    10.00      1        1     9.33      2        2     8.71      3        3     8.12      4        4     7.58      5        5     7.07When:  MP = 10  Actual Score = 21  h = 10The results are: Prediction  Error  Points     17        4    7.58     18        3    8.12     19        2    8.71     20        1    9.33     21        0   10.00     22        1    9.33     23        2    8.71     24        3    8.12     25        4    7.58This solves the problem of the points going to zero and below, but itstill has the problem of a one point error on a small score being thesame as a one point error on a large score.One solution to that problem is to relate the half life parameter to theactual score. My first test was to let   h = scoreIf the score is 10, h is 10. If the score is 50, h is 50.When the score is 21, h is also 21:  MP = 10  Actual Score = 21  h = 21The results are:  Prediction  Error  %Error  Points  %Points      16        5    23.81%   8.48    15.21%      17        4    19.05%   8.76    12.37%      18        3    14.29%   9.06     9.43%      19        2     9.52%   9.36     6.39%      20        1     4.76%   9.68     3.25%      21        0     0.00%  10.00     0.00%      22        1     4.76%   9.68     3.25%      23        2     9.52%   9.36     6.39%      24        3    14.29%   9.06     9.43%      25        4    19.05%   8.76    12.37%      26        5    23.81%   8.48    15.21%Now the percent loss of points is roughly equal to the percent loss inthe prediction.And when:  MP = 10  Actual Score = 3  h = 3The results are:  Prediction  Error  %Error  Points  %Points       0         3  100.00%   5.00    50.00%       1         2   66.67%   6.30    37.00%       2         1   33.33%   7.94    20.63%       3         0    0.00%  10.00     0.00%       4         1   33.33%   7.94    20.63%       5         2   66.67%   6.30    37.00%       6         3  100.00%   5.00    50.00%       7         4  133.33%   3.97    60.31%       8         5  166.67%   3.15    68.50%A 1-point error when the score is 21 gets a 0.32 point penalty, whereasfor a score of 3, it gets 2.06 point penalty. I don't know if thismathematically sound, but it feels about right. A 1-point error for ascore of 21 is 4.76%. A 0.32 point loss from 10 points is 3.25%, whichis comparable. The two percentages are slightly less comparable when thescore is "3".The problem arises when the score is zero. This results in a division byzero error (-error/h).I am not sure how to solve this one. I would appreciate some help.One idea I had is to add something to the halflife calculation.  h = ActualScore + nI have no idea how to calculate "n".Another idea I had was to discount the points in the same proportion asthe predictions.  pts = (abs(prediction-actualscore)/actualscore) * maxpointsThis has the same divide by zero problem when the score = 0.Summary: I need a way to assign points to football scoree predictionsthat reward accuracy in some consistent manner.
```