Live data from Hacker News

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

filiph.github.io

41–50 of 170 posts

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

#41
I have written similar tools

- for command line, fermi: https://git.nunosempere.com/NunoSempere/fermi

- for android, a distribution calculator: https://f-droid.org/en/packages/com.nunosempere.distribution...

People might also be interested in https://www.squiggle-language.com/, which is a more complex version (or possibly https://git.nunosempere.com/personal/squiggle.c>, which is a faster but much more verbose version in C)

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

#42

I have written similar tools - for command line, fermi: https://git.nunosempere.com/NunoSempere/fermi - for android, a distribution calculator: https://f-droid.org/en/packages/com.nunosempere.distribution... People might also be interested in https://www.squiggle-language.com/ , which is a more complex version (or possibly https://git.nunosempere.com/personal/squiggle.c >, which is a faster but much more verbose vers…

Fermi in particular has the following syntax

```

5M 12M # number of people living in Chicago

beta 1 200 # fraction of people that have a piano

30 180 # minutes it takes to tune a piano, including travel time

/ 48 52 # weeks a year that piano tuners work for

/ 5 6 # days a week in which piano tuners work

/ 6 8 # hours a day in which piano tuners work

/ 60 # minutes to an hour

```

multiplication is implied as the default operation, fits are lognormal.

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

#44
I like this!

In the grand HN tradition of being triggered by a word in the post and going off on a not-quite-but-basically-totally-tangential rant:

There’s (at least) three areas here that are footguns with these kinds of calculations:

1) 95% is usually a lot wider than people think - people take 95% as “I’m pretty sure it’s this,” whereas it’s really closer to “it’d be really surprising if it were not this” - by and large people keep their mental error bars too close.

2) probability is rarely truly uncorrelated - call this the “Mortgage Derivatives” maxim. In the family example, rent is very likely to be correlated with food costs - so, if rent is high, food costs are also likely to be high. This skews the distribution - modeling with an unweighted uniform distribution will lead to you being surprised at how improbable the actual outcome was.

3) In general normal distributions are rarer than people think - they tend to require some kind of constraining factor on the values to enforce. We see them a bunch in nature because there tends to be negative feedback loops all over the place, but once you leave the relatively tidy garden of Mother Nature for the chaos of human affairs, normal distributions get pretty abnormal.

I like this as a tool, and I like the implementation, I’ve just seen a lot of people pick up statistics for the first time and lose a finger.

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

#45

The ASCII art (well technically ANSI art) histogram is neat. Cool hack to get something done quickly. I'd have spent 5x the time trying various chart libraries and giving up.

On a similar note, I like the crude hand-drawn illustrations a lot. Fits the "napkin" theme.

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

#46
There's an amazing scene in "This is Spinal Tap" where Nigel Tufnel had been brainstorming a scene where Stonehenge would be lowered from above onto the stage during their performance, and he does some back of the envelope calculations which he gives to the set designer. Unfortunately, he mixes the symbol for feet with the symbol for inches. Leading to the following:

https://www.youtube.com/watch?v=Pyh1Va_mYWI

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

#47

I have written similar tools - for command line, fermi: https://git.nunosempere.com/NunoSempere/fermi - for android, a distribution calculator: https://f-droid.org/en/packages/com.nunosempere.distribution... People might also be interested in https://www.squiggle-language.com/ , which is a more complex version (or possibly https://git.nunosempere.com/personal/squiggle.c >, which is a faster but much more verbose vers…

Fermi in particular has the following syntax ``` 5M 12M # number of people living in Chicago beta 1 200 # fraction of people that have a piano 30 180 # minutes it takes to tune a piano, including travel time / 48 52 # weeks a year that piano tuners work for / 5 6 # days a week in which piano tuners work / 6 8 # hours a day in which piano tuners work / 60 # minutes to an hour ``` multiplication is implied as the defau…

Here is a thread with some fun fermi estimates made with that tool: e.g., number of calories NK gets from Russia: https://x.com/NunoSempere/status/1857135650404966456

900K 1.5M # tonnes of rice per year NK gets from Russia

* 1K # kg in a tone

* 1.2K 1.4K # calories per kg of rice

/ 1.9K 2.5K # daily caloric intake

/ 25M 28M # population of NK

/ 365 # years of food this buys

/ 1% # as a percentage

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

#48
Cool! Some random requests to consider: Could the range x~y be uniform instead of 2 std dev normal (95.4%ile)? Sometimes the range of quantities is known. 95%ile is probably fine as a default though. Also, could a symbolic JS package be used instead of Monte-Carlo? This would improve speed and precision, especially for many variables (high dimensions). Could the result be shown in a line plot instead of ASCII bar chart?

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

#49
post #44

I like this! In the grand HN tradition of being triggered by a word in the post and going off on a not-quite-but-basically-totally-tangential rant: There’s (at least) three areas here that are footguns with these kinds of calculations: 1) 95% is usually a lot wider than people think - people take 95% as “I’m pretty sure it’s this,” whereas it’s really closer to “it’d be really surprising if it were not this” - by and…

> I’ve just seen a lot of people pick up statistics for the first time and lose a finger.

I love this. I've never though of statistics like a power tool or firearm, but the analogy fits really well.

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

#50
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

Post reply on HN