Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm currently without direction in this problem and need guidance as to whether what I'm attempting is possible.

I'm attempting to derive the length of a specific task from employee supplied data. Lets assume there are multiple tasks an employee performs throughout the day, and they occasionally report the tasks accomplished along with how long the collective tasks took to complete. Is it possible, with enough data, to identify the approximate true length of each task?

For example lets say that the true length of changing a garbage is 2 minutes (very short). When an employee claims they have performed a garbage swap alongside other tasks, and provides an accurate time it took to complete the group of tasks, if we average the time taken to complete all tasks by the number of tasks performed we should arrive at an average which "pulls" towards two minutes.

Now say we don't know the true value of changing a garbage, but we have numerous employee submissions which involve changing the garbage, and are thusly "pulled" towards the true value. This average should, given enough data, be lower than the mean time of all tasks. Is there any formula or computation which allows for the approximation of the tasks true length when compared to the average of all tasks?

share|improve this question
Maybe better suited for stats.stackexchange.com –  Julian Kuelshammer Jan 17 '13 at 9:06
I believe you are right, thank you for politely informing me. The internet isn't always so civil. –  James MacKay Jan 17 '13 at 16:14

1 Answer 1

If I understand your question correctly, all you need is a standard linear least squares approach that leads to a system of linear equations. Say you have $n$ tasks and $m$ reports, with report $j$ reporting a time $t_j$ for a group of tasks in which task $k$ was performed $a_{jk}$ times. Then you can introduce unknown task durations $x_k$ for the tasks and minimize the sum of squared errors

$$ \sum_j\left(\sum_ka_{jk}x_k-t_j\right)^2\;. $$

Setting the derivatives with respect to $x_l$ to zero yields

$$ \sum_ja_{jl}\left(\sum_ka_{jk}x_k-t_j\right)=0\;, $$

which we can rewrite in matrix form as

$$ A^\top Ax=A^\top t $$

and thus solve as

$$ x=\left(A^\top A\right)^{-1}A^\top t\;. $$

See the Wikipedia article linked to above for more details. You may want to introduce the constraint that the task durations $x_k$ should be non-negative; in that case you can set any durations that come out as negative to zero, eliminate them and solve again for the rest.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.