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.
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].
> 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!
Very cool. This can also be used for LLM cost estimation. Basically any cost estimation I suppose. I use cloudflare workers a lot and have a few workers running for a variable amount of time. This could be useful to calculate a ball park figure of my infra cost. Thank you!
An alternative approach is using fuzzy-numbers. If evaluated with interval arithmetic you can do very long calculations involving uncertain numbers very fast and with strong mathematical guarantees.
It would especially outperform the Monte-Carlo approach drastically.
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?
Comments (162) 55 threads
Earlier commentsSomeone also turned it into the https://github.com/rethinkpriorities/squigglepy python library
Thanks for the link!
Want to use it every 3 months or so to pretend that we know what we can squeeze in the roadmap for the quarter.
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 is uniform?
[1] https://github.com/filiph/unsure/blob/123712482b7053974cbef9...
[2] https://filiph.github.io/unsure/#f=1~2
> 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.
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!
It would especially outperform the Monte-Carlo approach drastically.
Although fuzzy-number can be used to model many different kinds of uncertainties.
Continue this thread — 1 reply
All comments shown.
Couldn't load more comments. Check your connection and try again.