Effort and Schedule Estimation Copyright, 2006 © L. Ouyang Liubo Ouyang Personal Software Process Lecture 7
L.Ouyang, PSP, Lecture 7 Introduction Time & defect recording Time & defect recording Coding strd+Size measuremnt+PIP Coding strd+Size measuremnt+PIP Size estimating + Test report Task & schedule planning Code & design reviews Code & design reviews Design templates Design templates Cyclic dev. Cyclic dev. Baseline Planning Quality Cyclic
L.Ouyang, PSP, Lecture 7 Introduction begin.. end 500 LOC
L.Ouyang, PSP, Lecture 7 Plan of the lecture IntroductionIntroduction From the previous lectureFrom the previous lecture Effort estimationEffort estimation Multiple estimatesMultiple estimates Schedule estimatingSchedule estimating Progress trackingProgress tracking
L.Ouyang, PSP, Lecture 7 From the previous lecture.. Humphrey, CMU, 1995 PROxy-Based Estimating Objects as proxies StandardcomponentmethodFuzzylogicmethod Probemethod
L.Ouyang, PSP, Lecture 7 From the previous lecture.. 4. Knowing: programming language object type size ranges the number of methods estimate, using historical data, size of each object.
L.Ouyang, PSP, Lecture 7 From the previous lecture.. 6. Apply linear regression to get estimated program size Y: Y = 1 X + 0 5 means 10 5 means 10
L.Ouyang, PSP, Lecture 7 From the previous lecture.. 7. Using the t distribution and standard deviation compute the prediction interval for a given percentage. For 100% the For 100% the interval is [0; + ]
L.Ouyang, PSP, Lecture 7 From the previous lecture.. (X - x avg ) 2 (x i - x avg ) n +1 Range = t 7c. Compute the range as follows: Initial estimate obtained in Step 5
L.Ouyang, PSP, Lecture 7 Plan of the lecture IntroductionIntroduction From the previous lectureFrom the previous lecture Effort estimationEffort estimation Multiple estimatesMultiple estimates Schedule estimatingSchedule estimating Progress trackingProgress tracking
L.Ouyang, PSP, Lecture 7 Effort estimation begin.. end Programs written so far Historical data It should take... man month to finish the project
L.Ouyang, PSP, Lecture 7 Effort estimation begin.. end Estimatedsize Actualtime Historical data
L.Ouyang, PSP, Lecture 7 Effort estimation begin.. end Estimatedsize Actualtime Historical data r 2 0.5
L.Ouyang, PSP, Lecture 7 Effort estimation Estimated size Actual time 1. 0, 1 2. Effort = 1 * Estimated_size + n +1 3. Range = t r 2 Effort min = Effort - Range
L.Ouyang, PSP, Lecture 7 Effort estimation begin.. end Estimatedsize Actualtime Historical data Lack of data or lack of correlation between estimated size and actual time
L.Ouyang, PSP, Lecture 7 Effort estimation begin.. end Actualsize Actualtime Historical data
L.Ouyang, PSP, Lecture 7 Effort estimation begin.. end Actualsize Actualtime Historical data r 2 0.5
L.Ouyang, PSP, Lecture 7 Effort estimation Actual size Actual time 1. 0, 1 2. Effort = 1 * Estimated_size + n +1 3. Range = t r 2 0.5
L.Ouyang, PSP, Lecture 7 Effort estimation begin.. end Actualsize Actualtime Historical data Lack of correlation between software size and actual time
L.Ouyang, PSP, Lecture 7 Effort estimation Actual size Actual time Effort = Estimated_size / P av time time 2 size size 2 P av = 3. P min = min { size i / time i } P max = max { size i / time i } P max = max { size i / time i } 4. Effort min = Estimated_size/P max Effort max = Estimated_size/P min Effort max = Estimated_size/P min
L.Ouyang, PSP, Lecture 7 Effort estimation No data about time You have to make a guess Actual size & actual time with r 2 < 0.5 Productivity-based estimation Actual size & actual time with r 2 0.5 Effort estimate + range (inaccurate) Estimated size & actual time with r 2 0.5 Effort estimate + prediction interval
L.Ouyang, PSP, Lecture 7 Plan of the lecture IntroductionIntroduction From the previous lectureFrom the previous lecture Effort estimationEffort estimation Multiple estimatesMultiple estimates Schedule estimatingSchedule estimating Progress trackingProgress tracking
L.Ouyang, PSP, Lecture 7 Multiple estimates Is the prediction interval [89.8, 195.2] correct?
L.Ouyang, PSP, Lecture 7 Multiple estimates Range(70%) = 32.3
L.Ouyang, PSP, Lecture 7 Multiple estimates Given: time estimates T 1, T 2,.., T n their standard deviations 1, 2,.., n. their standard deviations 1, 2,.., n. T total = T 1 + T T n total = n 2 T min (70%) = T total - total T max (70%) = T total + total T min (70%) = T total - total T max (70%) = T total + total T min (95%) = T total - 2* total T max (95%) = T total + 2* total T min (95%) = T total - 2* total T max (95%) = T total + 2* total In general:
L.Ouyang, PSP, Lecture 7 PROBE-generated predictions Task: Write a class C1: 144 LOC Write a class C2: 193 LOC Write a class C3: 318 LOC S total = 655 LOC S total = 655 LOCTask: Write a class C1: 144 LOC Write a class C2: 193 LOC Write a class C3: 318 LOC S total = 655 LOC S total = 655 LOC 1 = 0 = = 5.69 2 = (T i - 0 - S i 1 ) 2 / (n-2) T total = 0 + S total * 1 = (S total - s avg ) 2 (s i - s avg ) n + 1 Range = t Range(70%)= 16.3
L.Ouyang, PSP, Lecture 7 Plan of the lecture IntroductionIntroduction From the previous lectureFrom the previous lecture Effort estimationEffort estimation Multiple estimatesMultiple estimates Schedule estimatingSchedule estimating Progress trackingProgress tracking
L.Ouyang, PSP, Lecture 7 Schedule estimating Size Effort Calendar Schedule Availability factor
L.Ouyang, PSP, Lecture 7 Schedule estimating [h] [h] 1w2w3w4w5w6w7w Task 1Task 2Task 3
L.Ouyang, PSP, Lecture 7 Schedule estimating Project: ColorMap Data:
L.Ouyang, PSP, Lecture 7 Schedule estimating Project: ColorMap Data:
L.Ouyang, PSP, Lecture 7 Plan of the lecture IntroductionIntroduction From the previous lectureFrom the previous lecture Effort estimationEffort estimation Multiple estimatesMultiple estimates Schedule estimatingSchedule estimating Progress trackingProgress tracking
L.Ouyang, PSP, Lecture 7 Progress tracking Problem: how to track a progress when a sequence of tasks is rearranged? Earned Value Method: Each task is assigned a number of credit points. Each task is assigned a number of credit points. To earn the points assigned to a task, the task must be completed. To earn the points assigned to a task, the task must be completed. The points reflect ‘time complexity’ and are normalised to 1000 points.The points reflect ‘time complexity’ and are normalised to 1000 points. T1T2 T1T2
L.Ouyang, PSP, Lecture 7 Progress tracking Earned Value Method
L.Ouyang, PSP, Lecture 7 Progress tracking Project: ColorMap Data:
L.Ouyang, PSP, Lecture 7 Progress tracking Project: ColorMap Data:
L.Ouyang, PSP, Lecture 7 I’ve forgotten about I’ve forgotten about task T j !!! Progress tracking Adjusted EV: New_EV i = x1000 time i time j + time k
L.Ouyang, PSP, Lecture 7 Progress tracking Project: ColorMap Data:
L.Ouyang, PSP, Lecture 7 Summary Effort estimation is based on size estimation. Three cases: Best case Middle case Worst case Multiple estimates Schedule estimating Earned Value Method
L.Ouyang, PSP, Lecture 7 Further readings W. Humphrey, A Discipline for Software Engineering, Addison- Wesley, Reading, 1995, Chapter 5.
L.Ouyang, PSP, Lecture 7 Quality assessment 1. What is your general impression ? (1 - 6) 2. Was it too slow or too fast ? 3. Did you learn something important to you ? 4. What to improve and how ?