It sounds like a gimmick at first, but looks surprisingly useful. I'd surely install it if it was available as an app to use alongside my usual calculator, and while I cannot quite recall a situation when I needed it, it seems very plausible that I'll start finding use cases once I have it bound to some hotkey on my keyboard.
Not really, or at least not permanently; uniform distribution is mentioned in a github changelog, perhaps it’s an upcoming feature:
> 0.4.0 > BRAKING: x~y (read: range from x to y) now means "flat distribution from x to y". Every value between x and y is as likely to be emitted. > For normal distribution, you can now use x+-d, which puts the mean at x, and the 95% (2 sigma) bounds at distance d from x. https://github.com/filiph/unsure/blob/master/CHANGELOG.md#04...
I think they should be functions: G(50, 1) for a Gaussian with µ=50, σ=1; N(3) for a negative exponential with λ=3, U(0, 1) for a uniform distribution between 0 and 1, UI(1, 6) for an uniform integer distribution from 1 to 6, etc. Seems much more flexible, and easier to remember.
I didn't peruse the source code. I just read the linked article in its entirety and it says
> The computation is quite slow. In order to stay as flexible as possible, I'm using the Monte Carlo method. Which means the calculator is running about 250K AST-based computations for every calculation you put forth. So therefore I conclude Monte Carlo is being used.
Line 19 to 21 should be the Monte-Carlo sampling algorithm. The implementation is maybe a bit unintuitive but apparently he creates a function from the expression in the calculator, calling that function gives a random value from that function.
Here (https://uncertainty.nist.gov/) is another similar Monte Carlo-style calculator designed by the statisticians at NIST. It is intended for propagating uncertainties in measurements and can handle various different assumed input distributions.
I think I was looking at this and several other similar calculators when creating the linked tool. This is what I mean when I say "you'll want to use something more sophisticated".
The problem with similar tools is that of the very high barrier to entry. This is what my project was trying to address, though imperfectly (the user still needs to understand, at the very least, the concept of probability distributions).
Comments (162) 55 threads
Earlier commentsConsider https://f-droid.org/en/packages/com.nunosempere.distribution...
> 0.4.0
> BRAKING: x~y (read: range from x to y) now means "flat distribution from x to y". Every value between x and y is as likely to be emitted.
> For normal distribution, you can now use x+-d, which puts the mean at x, and the 95% (2 sigma) bounds at distance d from x.
https://github.com/filiph/unsure/blob/master/CHANGELOG.md#04...
https://github.com/filiph/unsure/blob/master/lib/src/calcula...
I assume this is a montecarlo approach? (Not to start a flamewar, at least for us data scientists :) ).
> The computation is quite slow. In order to stay as flexible as possible, I'm using the Monte Carlo method. Which means the calculator is running about 250K AST-based computations for every calculation you put forth.
So therefore I conclude Monte Carlo is being used.
The problem with similar tools is that of the very high barrier to entry. This is what my project was trying to address, though imperfectly (the user still needs to understand, at the very least, the concept of probability distributions).
All comments shown.
Couldn't load more comments. Check your connection and try again.