Live data from Hacker News

Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

filiph.github.io

121–130 of 170 posts

Re: Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

#121
post #36

If I am reading this right, a range is expressed as a distance between the minimum and maximum values, and in the Monte Carlo part a number is generated from a uniform distribution within that range[1]. But if I just ask the calculator "1~2" (i.e. just a range without any operators), the histogram shows what looks like a normal distribution centered around 1.5[2]. Shouldn't the histogram be flat if the distribution i…

Under the "Limitations" section: > Range is always a normal distribution, with the lower number being two standard deviations below the mean, and the upper number two standard deviations above. Nothing fancier is possible, in terms of input probability distributions.

Part of the confusion here is likely that the tool, as seen on the web, probably lags significantly behind the code. I've started using a related but different tool (https://filiph.github.io/napkin/).

The HN mods gave me an opportunity to resubmit the link, so I did. If I had more time, I'd have also upgraded the tool to the latest version and fix the wording. But unfortunately, I didn't find the time to do this.

Apologies for the confusion!

Re: Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

#122
post #31

Earlier quoted context omitted.

This assumes the inputs are uniform distributions, or perhaps normals depending on what exactly fuzzy numbers mean. M-C is not so limited.

No. It assumes the numbers aren't random at all. Although fuzzy-number can be used to model many different kinds of uncertainties.

I'm familiar with fuzzy numbers (e.g. see my https://filiph.net/fuzzy/ toy) but I didn't know there's arithmetic with fuzzy numbers. How is it done? Do you have a link?

Re: Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

#123

This reminds me of https://www.getguesstimate.com/ , a probabilistic spreadsheet.

The authors of Guesstimate are now working on https://www.squiggle-language.com/ Someone also turned it into the https://github.com/rethinkpriorities/squigglepy python library

Wow, this is fantastic! I did not know about squiggle language, and it's basically what I was trying to get to from my unsure calculator through my next project (https://filiph.github.io/napkin/). Squiggle looks and works much better.

Thanks for the link!

Re: Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

#124
post #122

Earlier quoted context omitted.

No. It assumes the numbers aren't random at all. Although fuzzy-number can be used to model many different kinds of uncertainties.

I'm familiar with fuzzy numbers (e.g. see my https://filiph.net/fuzzy/ toy) but I didn't know there's arithmetic with fuzzy numbers. How is it done? Do you have a link?

There is a book by Hanss on it. It focuses on the sampling approach (he calls it "transformation method") though.

If you want to do arithmetic and not a black box approach you just have to realize that you can perform them on the alpha-cuts with ordinary interval arithmetic. Then you can evaluate arbitrary expressions involving fuzzy numbers, keeping the strengths and weaknesses of interval arithmetic.

The sampling based approach is very similar to Monte-Carlo, but you sample at certain well defined points.

Re: Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

#125
post #105

Earlier quoted context omitted.

I did a project with non-technical stakeholders modeling likely completion dates for a big GANTT chart. Business stakeholders wanted probabilistic task completion times because some of the tasks were new and impractical to quantify with fixed times. Stakeholders really liked specifying work times as t_i ~ PERT(min, mode, max) because it mimics their thinking and handles typical real-world asymmetrical distributions.…

This looks like a much more sophisticated version of PERT than I have seen used. When people around me have claimed to use PERT, they have just added together all the small numbers, all the middle numbers, and all the big numbers. That results in a distribution that is too extreme in both lower and upper bound.

that... is not PERT. it's 'I read a tweet about three point estimates' and I'm using a generous interpretation of read

Re: Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

#126

This is super cool. It seems to break for ranges including 0 though 100 / -1~1 = -3550~3500 I think the most correct answer here is -inf~inf

I'd argue this is WAI.

It's hard for me to imagine _dividing_ by -1~1 in a real-world scenario, but let's say we divide by 0~10, which also includes zero. For example, we are dividing the income between 0 to 10 shareholders (still forced, but ok).

Clearly, it's possible to have a division by zero here, so "0 sharehodlers would each get infinity". And in fact, if you try to compute 500 / 0, or even 500~1000 / 0, it will correctly show infinity.

But if you divide by a range that merely _includes_ zero, I don't think it should give you infinity. Ask yourself this: does 95% of results of 500 / 0~10 become infinity?

Re: Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

#127
post #106

On the whole it seems like a nice idea, but there's a couple of weird things, such as: > Note: If you're curious why there is a negative number (-5) in the histogram, that's just an inevitable downside of the simplicity of the Unsure Calculator. Without further knowledge, the calculator cannot know that a negative number is impossible (in other words, you can't have -5 civilizations, for example). The input to this w…

The calculator in Emacs has support for what it is you request, which it calls "interval forms". Interval form arithmetic simply means executing the operations in parallel on both ends of the interval. It also has support for "error forms" which is close to what the calculator in OP uses. That takes a little more sophistication than just performing operations on the lower and upper number in parallel. In particular,…

Is it actually just doing it at both ends or something nore complex? Because for example if I did 7 - (-1~2)^2 the actual range would be 3-7 but just doing both ends of the interval would give 3-6 as the function is maximised inside the range.

Re: Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

#128

This is neat! If you enjoy the write up, you might be interested in the paper “Dissolving the Fermi Paradox” which goes even more on-depth into actually multiplying the probability density functions instead of the common point estimates. It has the somewhat surprising result that we may just be alone. https://arxiv.org/abs/1806.02404

a bit depressing TBH... but ~everyone on this site should read this for the methodology

Re: Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator

#129

On the whole it seems like a nice idea, but there's a couple of weird things, such as: > Note: If you're curious why there is a negative number (-5) in the histogram, that's just an inevitable downside of the simplicity of the Unsure Calculator. Without further knowledge, the calculator cannot know that a negative number is impossible (in other words, you can't have -5 civilizations, for example). The input to this w…

>The input to this was "1.5~3 x 0.9~1.0 x 0.1~0.4 x 0.1~1.0 x 0.1~1.0 x 0.1~0.2 x 304~10000" - every single range was positive, so regardless of what this represents, it should be impossible to get a negative result.

Every single range here includes positive and negative numbers. To get the correct resulting distribution you have to take into account the entire input distribution. All normal distributions have a non-zero possibility to be negative.

If you want to consider only the numbers inside the range you can look at interval arithmetic, but that does not give you a resulting distribution.

Post reply on HN