Computing an effort estimate from a size estimate is where we start to run into some of the weaknesses of the art of estimation and need to rely more on the science of estimation.
If your historical data is for projects within a narrow size range (say, a factor of 3 difference from smallest to largest), you are probably safe using a linear model to compute the effort estimate for a new project based on the effort results from similar past projects. Table 19-2 shows an example of past-project data that could form the basis for such an estimate.
Project | Size (LOC) | Schedule (Calendar Months) | Effort (Staff Months) | Productivity (LOC/Staff Month) | Comments |
---|---|---|---|---|---|
Project A | 33,842 | 8.2 | 21 | 1,612 | |
Project B | 97,614 | 12.5 | 99 | 986 | |
Project C | 7,444 | 4.7 | 2 | 3,722 | Not used—too small for comparison |
Project D | 54,322 | 11.3 | 40 | 1,358 | |
Project E | 340,343 | 24.0 | 533 | 639 | Not used—too large for comparison |
Suppose you're estimating the effort for a new business system, and you've estimated the size of the new software to be 65,000 to 100,000 lines of Java code, with a most likely size of 80,000 lines of code. Project C is too small to use for comparison purposes because it is less than one-third the size of the low end of your range. Project E is too large to use for comparison purposes because it is more than 3 times the top end of your range. Thus your relevant historical productivity range is 986 LOC per staff month (Project B) to 1,612 LOC per staff month (Project A). Dividing the lowest end of your size range by the highest productivity rate gives a low estimate of 40 staff months. Dividing the highest end of your size range by the lowest productivity gives a high estimate of 101 staff months. Your estimated effort is 40 to 101 staff months.
A good working assumption is that the range includes 68% of the possible outcomes (that is, ±1 standard deviation, unless you have reasons to assume otherwise). You can refer back to Table 10-6, "Percentage Confident Based on Use of Standard Deviation," to consider other probabilities that the 40 to 101 staff-month range might include.
Because you're using historical data to create this estimate, it includes whatever effort is included in the historical data. If the historical data included effort only for development and testing, and only for the part of the project from end of requirements through system testing, that's what the estimate includes. If the historical data also included effort for requirements, project management, and user documentation, that's what the estimate includes.
In principle, estimates that are based on industry-average data usually include all technical work, but not management work, and all development work except requirements. In practice, the data that goes into computing industry-average data doesn't always follow these assumptions, which is part of why industry-average data varies as much as it does.