Show HN: Unsure Calculator – back-of-a-napkin probabilistic calculator
How it works & notation
- Calculator interprets expressions with uncertain numbers, sampling them via Monte Carlo (≈250k evaluations) and reporting quantiles (esp. 95% ranges).
a~bdenotes a range; in some versions this is a normal distribution withaandbat ±2σ, in newer code it’s a uniform distribution, causing confusion because the deployed web app lags behind the changelog.- Other syntaxes discussed:
x +- dfor a normal with meanxand 95% boundsx±d; function-like distributions (G(µ,σ),U(a,b), etc.) were proposed. - The tool treats the whole expression as a single random variable, not doing formal error propagation.
Statistical limitations & edge cases
- Multiple comments probe behavior on divisions with ranges including 0 (e.g.
1/(-1~1)); users expected something like ±∞, but the tool reports a finite 95% interval. Some argue this is correct for a 95% CI; others find it unintuitive given heavy-tailed reciprocal distributions. - Negative outputs from all-positive “ranges” arise because those ranges are 95% intervals of an underlying normal, which extends below zero; some find this reasonable, others would prefer hard-bounded intervals.
- Independence assumptions are highlighted as a major caveat: real-world quantities (rent vs. food, tasks sharing a person, macroeconomic shocks) are often correlated, which the tool doesn’t model.
- Several commenters note people systematically underestimate 90–95% intervals; the tool can help expose that overconfidence.
Feature ideas and UX feedback
- Requests: explicit choice of distribution (normal, uniform, log-normal, triangular), correlation modeling, constraints (e.g.
B = 4 − A, B>0), a “confidence” operator, non-scalar multiplication (e.g. sum of dice instead of scaling a single draw), better mobile UX, and graphical plots beyond ASCII histograms. - Some find web latency high; others use or propose faster CLI / Python / NumPy variants.
Alternative approaches and related tools
- Mentioned alternatives: probabilistic spreadsheets (Guesstimate, Carlo), Squiggle language, Android “distribution calculator”, command-line tools (fermi, Precel), qalc, NIST uncertainty calculator, interval/affine arithmetic, fuzzy numbers, Prolog interval constraint libraries, Emacs calculator modes.
- Debate over Monte Carlo vs. interval/fuzzy methods: Monte Carlo is more flexible in distributions; interval approaches give hard bounds and can be faster but don’t produce full PDFs.
Perceived uses and educational value
- Widely praised as a way to build intuition for uncertainty, Fermi estimation, and back-of-the-envelope reasoning.
- Example use cases: software/project estimation, personal finance, LLM or cloud cost estimation, marketing campaign planning, rough market sizing, geometry/engineering back-calculations.