Bug-fix times
Model how long a bug takes to fix, set aside a model that looks plausible and is not, and budget a sprint with the central limit theorem.
Draws on 4. The uniform distribution, 9. The exponential distribution, 10. Sampling distributions and the CLT
Step 1The question
A software team records how long each bug takes to fix (the lab's bug-fix-times.csv, 2,000 fixes). The team lead wants to plan: how long does a typical fix take, and how many hours should a sprint of 40 bugs be given?
Step 2Choosing the model
Every fix took between 1 and 5 hours, and the histogram is flat: a continuous uniform, U(1, 5). An exponential with the same mean looks plausible for a waiting time and fits badly (chapter 9): it expects many fixes under an hour and some over 5 hours, and there are none.
A fix within 3 hours
Under U(1, 5), what is the probability that a fix takes at most 3 hours?
More than 2 hours
Under U(1, 5), what is the probability that a fix takes more than 2 hours?
Step 3A sprint of 40 bugs
The total time for 40 fixes is a sum, and by the CLT it is close to normal: its mean is \(40 \times 3 = 120\) hours and its standard deviation \(\sqrt{40} \times 1.1547 = 7.303\) hours, where 1.1547 is the uniform's \(\tfrac{4}{\sqrt{12}}\).
A sprint's budget
How many hours should a sprint of 40 bugs be given, so that the fixes fit in the budget with probability 0.95 (the 95th percentile of the total, to four decimals)?
A budget of 132 hours covers the sprint 19 times in 20. Planning every fix at its own 95th percentile, 4.8 hours, would ask for 192 hours, far too many: in a total, long and short fixes cancel out, which is why the spread of a sum grows only with \(\sqrt{40}\).