Live data from Hacker News

How to replace estimations and guesses with a Monte Carlo simulation

lucasfcosta.com

101–110 of 162 posts

Re: How to replace estimations and guesses with a Monte Carlo simulation

#101

Many commenters on this story believe the main purpose of estimation is to assert when something will be done. Then they say "this is impossible" and call the whole exercise a waste of time, or management abuse. I gotta tell you that unless you're working with absolute bozos, nobody is looking at estimates and saying "oh duh, I am betting the farm this will complete on that date." Benefits of estimation that are more…

While the article is rather low quality in and of itself, it still manages to point out:

> Before claiming that the simulation above is reliable, I must expose a few things you’ll need to pay attention to when using a Monte Carlo Simulation to make forecasts:

> (A) The quality of the inputs upon which your simulations depend.

> (B) The consistency and predictability of your team.

> (C) The need to re-forecast.

> (D) The size of your work packages.

Among those, I am not exactly sure what the author is referring to with (C). However, problems arise most often when none of A, B, and D is controlled by the person being asked to estimate.

Now, if you can control A, B, and D, YOU DO NOT NEED TO RUN MONTE CARLO. You'll be able to split the work and guess within 10 - 20% just by using rules of thumb.

If you cannot control A, B, and D, running Monte Carlo will not help you.

I say this as a person who's been doing Monte Carlo since the late 80s.

Re: How to replace estimations and guesses with a Monte Carlo simulation

#102

I'd love to hear a post mortem blog post on a project that was ran in this way in real life & what the pros/cons at different stages were. The author first talks about the waste of time that is upfront analysis/planning or adding a buffer for contingency and how Monte Carlo simulation fixes for that, but then the caveats seem to be based on an established team, of a fixed size doing similar style work. For me, this s…

The book "How to Measure Anything" by Douglas W. Hubbard has a chapter on using Monte Carlo simulations to do project planning and gather estimates. It's successfully been used for project planning large complex projects like building nuclear power plants, or projects that NASA or the Navy or similar have done.

The approach is slightly different then the article above describes. Instead it has each engineer go through calibration exercises until they can fairly accurately produce 5th and 95th confidence interval estimates. Then each engineer provides 5th and 95th confidence interval estimates for each item that needs to be worked on. Those confidence intervals are kept separate. You can then run a Monte Carlo simulation where each piece of work is weighted randomly assigned to each engineer that provided estimates for that particular item, and randomly picks a number based off their provided confidence interval estimate on how long it ends up taking them to complete the item for this particular simulation.

I was on a small team that used the above technique. We were in a large company trying to launch a new product, and given manufacturing lead time, and seasonality of the market demand, it was very important that we could provide a good estimate to the business when we could have the software portion of the MVP completed. The business provided us with what they thought the MVP features were, we further added in engineering tasks that weren't business facing, but needed to be completed. We confidence interval estimated those, and then also confidence interval estimated our personal vacation days, sick days, as well as a bucket of "unidentified work". The 80th percentile Monte Carlo simulation put us out a little more then a year. Our actual delivery was off by only a week from the Monte Carlo tp80; I don't remember in which direction, but it wasn't consequential to the business.

Re: How to replace estimations and guesses with a Monte Carlo simulation

#103

While a different application than shown here, my project management class taught me one of the biggest benefits of Monte Carlo simulation - estimating uncertainty. Traditionally, net present value calculations are done with single point estimates. For example, analyzing a rental property we want to buy, we'd estimate the vacancy rate, interest rate, property appreciation, maintenance expenses, and do all of that on…

> Monte Carlo simulation - estimating uncertainty.

By definition, "uncertainty" is the thing that does not have a PDF ... You can quantify risk based on assumptions you make about underlying probability distributions from which you are drawing. Far too often, even in Monte Carlo, people decide to work with the easy distributions instead of the most appropriate distributions.

The "easy" distributions tend to admit actual mathematical solutions which means Monte Carlo is helpful if you can't do the math but not strictly necessary.

Monte Carlo shines when you cannot get nice solution and there is your opportunity to not be constrained by the need to do so: Draw from appropriate distributions.

Also, know the difference between LLN and CLT and when to appeal to which to justify your methods.

Re: How to replace estimations and guesses with a Monte Carlo simulation

#104
post #103

While a different application than shown here, my project management class taught me one of the biggest benefits of Monte Carlo simulation - estimating uncertainty. Traditionally, net present value calculations are done with single point estimates. For example, analyzing a rental property we want to buy, we'd estimate the vacancy rate, interest rate, property appreciation, maintenance expenses, and do all of that on…

> Monte Carlo simulation - estimating uncertainty. By definition, "uncertainty" is the thing that does not have a PDF ... You can quantify risk based on assumptions you make about underlying probability distributions from which you are drawing. Far too often, even in Monte Carlo, people decide to work with the easy distributions instead of the most appropriate distributions. The "easy" distributions tend to admit act…

But ... but ... everyone knows that Nature is linear and Gaussian. Shhhh.

Re: How to replace estimations and guesses with a Monte Carlo simulation

#105

I really dislike posts in this vein, because they use statements like "This post will teach you how to replace estimations and guesses with a Monte Carlo simulation." as though the output of a Monte Carlo simulation were not an estimate, but some higher truth. The process of simulating many different outcomes with a touch of randomness gives the layperson the impression that we are really _doing_ something, when in f…

Author here. Thanks a lot for your feedback. Indeed, "estimations" might not be the best word as you're still, in some way, estimating with the Monte Carlo approach. I thought of this differentiation because I consider the MC approach to yield a forecast, while an "estimation" is the typical term used in agile settings for "guessing how long/much work it will take.". I'll think of ways of making this distinction clea…

> Indeed, "estimations" might not be the best word as you're still, in some way, estimating with the Monte Carlo approach.

Not in some way -- literally. The samples are averaged, and as the number of samples goes to infinity, the average converges to some true value. In the case of one of the histograms you plot, you are averaging an indicator function .

> I thought of this differentiation because I consider the MC approach to yield a forecast, while an "estimation" is the typical term used in agile settings for "guessing how long/much work it will take.". I'll think of ways of making this distinction clearer.

It seems to me the distinction you care for is to provide not a single value ("estimate"), but a distribution of values. That's not specific to Monte Carlo.

> As for the misused mathematical terminology I guess you're referring to "confidence intervals"

That's certainly one of them. I even misunderstood what you were doing and said you don't need confidence intervals, but in the way you're using them those again can be obtained by quadrature.

My main gripe remains the language, and the presentation of the method. You could most likely obtain your results by hand, i.e. with pen and paper, and you would still get a distribution at the end of the day. The advantage of running Monte Carlo is that it simplifies this process. You could illustrate this by getting the distribution of the sum of two independent uniform random variables in two different ways: by doing a convolution, and by MC. Wow, MC was so much easier, anyone can do it, and it can handle arbitrarily complicated distributions (in principle).

Re: How to replace estimations and guesses with a Monte Carlo simulation

#106
I wrote a Monte Carlo area calculator once. Just draw an arbitrary shape and hit solve. You can increase the number of samples used.

https://victorribeiro.com/monteCarlo/

The drawing area is 500x500 pixels, so if the shape covers the whole area, the result should be 250.000 pixels

Re: How to replace estimations and guesses with a Monte Carlo simulation

#107

Many commenters on this story believe the main purpose of estimation is to assert when something will be done. Then they say "this is impossible" and call the whole exercise a waste of time, or management abuse. I gotta tell you that unless you're working with absolute bozos, nobody is looking at estimates and saying "oh duh, I am betting the farm this will complete on that date." Benefits of estimation that are more…

I would also argue that enabling capacity planning and drawing a boundary around the scope are also valuable by-products.

Perfection may be impossible, but Brooks' Law being a harsh mistress, and scope creep being a very real thing, having a serious think about how big you intend the project to be to be before you start can make the difference between finishing it in months, and having it turn into a years-long death march project.

Re: How to replace estimations and guesses with a Monte Carlo simulation

#108

Earlier quoted context omitted.

Author here. Thanks a lot for your feedback. Indeed, "estimations" might not be the best word as you're still, in some way, estimating with the Monte Carlo approach. I thought of this differentiation because I consider the MC approach to yield a forecast, while an "estimation" is the typical term used in agile settings for "guessing how long/much work it will take.". I'll think of ways of making this distinction clea…

> Indeed, "estimations" might not be the best word as you're still, in some way, estimating with the Monte Carlo approach. Not in some way -- literally. The samples are averaged, and as the number of samples goes to infinity, the average converges to some true value. In the case of one of the histograms you plot, you are averaging an indicator function . > I thought of this differentiation because I consider the MC a…

Understood. Thanks for taking the time to provide more detail.

I'll take some time to digest and think through changes, and either edit, or write a clarifying appendix.

Re: How to replace estimations and guesses with a Monte Carlo simulation

#109

Many commenters on this story believe the main purpose of estimation is to assert when something will be done. Then they say "this is impossible" and call the whole exercise a waste of time, or management abuse. I gotta tell you that unless you're working with absolute bozos, nobody is looking at estimates and saying "oh duh, I am betting the farm this will complete on that date." Benefits of estimation that are more…

You get all of the benefits that you’re looking for just by planning what needs to be done, estimations or not.

You break down the tasks, the dependencies, the risks, complications, places where there are options that need more research or comparison…and you’ll see the volume involved and have an idea of the size in the terms you mean. All without numerically estimating a single task in the plan.

Post reply on HN