Lurker News

Comments (162) 55 threads

Earlier comments
filiph#
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!

baq#
I was looking for this. Seen it (or a similar tool) ages ago.

Want to use it every 3 months or so to pretend that we know what we can squeeze in the roadmap for the quarter.

omoikane1 reply#
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 is uniform?
[1] https://github.com/filiph/unsure/blob/123712482b7053974cbef9...
[2] https://filiph.github.io/unsure/#f=1~2

hatthew1 reply#
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.

filiph#
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!

your_challenger#
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!
constantcrying1 reply#
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.

sixo1 reply#
This assumes the inputs are uniform distributions, or perhaps normals depending on what exactly fuzzy numbers mean. M-C is not so limited.
constantcrying1 reply#
No. It assumes the numbers aren't random at all.

Although fuzzy-number can be used to model many different kinds of uncertainties.

filiph1 reply#
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?

Continue this thread — 1 reply

Load more comments