← Back to context

Comment by NunoSempere

5 days ago

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)

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.

  • 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

  • Oh, this is very similar to what I have with Precel, less syntax. Thanks for sharing!

I tried the unsure calc and the android app and they seem to produce different results?

  • The android app fits lognormals, and 90% rather than 95% confidence intervals. I think they are a more parsimonious distribution for doing these kinds of estimates. One hint might be that, per the central limit theorem, sums of independent variables will tend to normals, which means that products will tend to be lognormals, and for the decompositions quick estimates are most useful, multiplications are more common