How to estimate project effort using Monte Carlo simulation
Cost estimation of a project
One of the most common task in project management is the estimation of costs. Talking about software development projects, the main cost driver is related on time elapsed: how many days a team shall work to complete a given set of tasks?
The most part of agile projects also has the same needs. Indeed, it is very difficult that a customer accept to start a project without any budget idea. This is because agile projects are often iterative and incremental, with the customer providing feedback at each stage of the project. This means that the customer needs to have a clear understanding of how much the project will cost in order to make informed decisions about what features to prioritize and what changes to request.
At a certain point, before a project eventually starts, usually the customer or the account manager will ask to the project manager to provide a cost estimation, that will be based on a rough description of the feature to implement. At this point, the question is: how the project manager can handle properly the risk, providing a resonate estimation of the developers’ effort based on the customer needs?
Six steps that a project manager can follow to control project’s risks, according ChatGPT
There are several steps that a project manager can take to properly handle the risk of providing an estimation of the developers’ effort based on the customer’s needs. These steps include:
- Identifying the potential sources of uncertainty and risk in the project, such as changes in requirements, new technology, or external factors like market conditions or competition.
- Developing a plan to mitigate these risks, such as by building in contingencies or flexible workarounds, or by working with the customer to clarify and prioritize their requirements.
- Gathering as much information as possible about the project, such as by talking to the developers and other stakeholders, conducting research, or reviewing similar projects.
- Using a reliable estimation method, such as the use case points method or the expert judgment method, to create a detailed and accurate estimate of the developers’ effort.
- Communicating the estimate clearly to the customer and other stakeholders, including any assumptions or uncertainties that may affect the accuracy of the estimate.
- Monitoring and tracking the project’s progress against the estimate and adjusting the estimate as needed based on actual performance.
Backlogs and stories
Approaching a brand-new software project, the PM can perform a short analysis of the requirements that the new product shall cover. This will help the project manager to understand the scope and complexity of the project, and to identify any potential challenges or risks that may need to be addressed.
Let we suppose that the software development for this specific project should follow and agile approach or something very similar.
After the analysis, according with the customer, the PM synthesis the requirements in three main processes and four subprocess: Process A, Process B.1, Process B.2, Process C.1, Process C.2. For each process, the PM and the customer agree on the stories to be cover. In the table there are the details.
Further, they also agree that could be a 20% of extra stories to be implemented.
Basic estimation
The very first estimation that the PM performs is to assign an expected duration in days for each story. According to its experience and talking with the development team, it seems that 6 days is the expected effort to assign at each story.
The grand total is 1944 days. But is it safe to found the project cost estimation on one single figure? What about the uncertainty and risk management?
Statistical description for tasks effort
According to project management best practice, the whole team provide more information to a better project estimation and risk evaluation. First of all, the team recognize that there are some subprocess a little bit more complicated than other others. In second place, the team provide for each subprocess three estimation: a) the minimum number of days to complete a story; b) the maximum number of days to complete a story; c) the expected number of days to complete a story.
This approach is often referred to as “three-point estimation” because it involves creating estimates for the minimum, maximum, and most likely outcomes for each subprocess.
The three points a, b, and c, can be interpreted in at least two way. The first: as the three points characteristics of a triangular distribution. The second: as the three points characteristics of a beta distribution.
In the first case, the expected effort is (a+b+c)/3. In the second case, the expected effort is (a+b+4c)/6.
You can refer at this link for more information on “three-point estimation”: https://www.projectmanagement.com/contentPages/wiki.cfm?ID=368763&thisPageURL=/wikis/368763/3-Points-Estimating
Effort estimations: Flat vs Statistical
Let we compare the obtained results.
Summing up the expected effort, we obtain a total of 1.944 days. With the triangular distribution, we have a total of 1.972 days. And finally, with the beta distribution, we have a total of 1.958 days.
More or less the same three numbers and no information on risks to face with.
Monte Carlo simulation
Having a probabilistic description of a process, i.e., a triangular distribution of each sub-process, a Monte Carlo approach can be implemented to sample the random events. The scope is to have for each event a possible project evolution that is compliant with the probabilistic description.
A possible implementation of the Monte Carlo simulation can 1) generate a random elapsed time according to the triangular distribution for each process in the backlog; 2) sum-up the elapsed times of step 1) to obtain the total effort for the entire project; 3) performs the steps 1) and 2) a high numbers time.
By repeating these steps many times, it can be eventually to generate a distribution of possible project outcomes that reflects the uncertainty and variability in the project. This can help to understand the risks and uncertainties that may affect the project, and to develop more robust risk management strategies.
The pictures show empirically that the project total effort has a specific distribution. Please, also note that the histogram and the candles are the results of a specific Monte Carlo simulation, so they can change a little bit at every simulation run.
Risk management approach to project estimation
If we would like to apply a risk management approach to project effort estimation, how we can proceed?
The 80th percentile provide an estimation of 2.316 days. This means that during the Monte Carlo simulation, the 80 per cent of the simulated scenarios consume no more than 2.316 days.
Being 2.732 days, the maximum effort expected for the project, this means that if we use 2.316 days as the effort estimated for the project, the project manager has the role to keep trascurable the cases of an actual duration of the project above the 80-th percentile. In this case, the PM assume to control the risk of at most 416 days.
Simulate in Excel. Or any other spreadsheet you prefer.
A sample Excel file is provided implementing the simulation described up here. Two are the main sheets:
- The sheet “Full estimation”, where you can modify the parameters of the simulation: a) the number of stories in the backlog (B2:B7); b) the minimum, maximum, and expected effort for each story in the backlog (C2:E7). In this sheet, you shall also find the results of the Monte Carlo simulation.
- The sheet “Simulation”, where are simulated 1000 possible project outcomes.
The Excel file can be downloaded at this link: https://1drv.ms/x/s!AiHv6aReYz9OhIhHQ46z78WA7bdanA?e=sHUCGk
Final remarks
Even if the exposed idea of apply Monte Carlo simulation and risk management to a project effort estimation is already broadly known, it seems that is not broadly applied as well.
Feel free to use and adapt the provided Excel to your own projects and needs.
If you have found useful this article, please add your reaction and share with your network.
For any remarks, please leave a comment or send me a message on LinkedIn.
Originally published at https://www.linkedin.com.