I want to create a compensation system which takes into account two variables. Lets say I have $1M to distribute among ten employees who produce widgets. I want to compensate each employee by two variables: How many widgets the employee produces and how quickly they are produced.
For instance, if each employee produced 100 widgets, each would receive $100,000.
Employees #1-9 took 100 hours to produce these widgets, but Employee #10 took 80 hours.
How would I compensate these employees in reciprocal proportion to their contribution to the overall hours of widget making (980hrs)?
In the above scenario, I would like employee #10 to be compensated more than $100,000 and employees #1-9 to be compensated slightly less, but for all compensation to still equal $1M.
Thanks!

One simple solution is to adjust the number of widgets produced to reflect 100 hours of work. In your example, Employee #10 produced 100 actual widgets in 80 hours, but $100*(5/4)=125$ adjusted widgets in 100 hours. Hence the ten employees made a total of $1025$ adjusted widgets. Then, divide the compensation by adjusted widgets. \$1M divided by 1025 is \$975.61 per adjusted widget. Hence the first nine employees all get \$97,561, while #10 gets \$121,951.
Every method has flaws; for this one, an employee could work super-hard and make 2 widgets in 1 hour, and then stop. Then the bonus would be huge!