Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for alternative probability distributions (such as uniform) #33

Open
alhirzel opened this issue Mar 12, 2019 · 4 comments
Open

Comments

@alhirzel
Copy link

alhirzel commented Mar 12, 2019

For some engineering applications, it is very helpful to use uniform distributions rather than Gaussian distributions. Examples include statistical geometric tolerance stacks, round-off noise in signal processing, and worst-case timing analysis of real-time systems. This issue proposes broadly that Measurements.jl have the ability to express a measurement with any known distribution (e.g. utilizing Distributions.jl) and the ability to automatically track a representation of the distribution. Specifically, it would be excellent for the engineering community to have propagation of uniform distributions. An alternative to this would be the creation of a separate project in the spirit of Measurements.jl but for uniform distributions.

@giordano
Copy link
Member

Thanks for your report. Honestly, I'm not going to implement this nice feature as I don't have much experience with error propagation in case of arbitrary probability distributions. Anyway I'll leave this ticket open for anyone willing to work on this.

A few days ago I came across this package: https://github.com/kahaaga/UncertainData.jl. This should be what you're looking for, but my understanding is that it doesn't support correlated quantities.

@alhirzel
Copy link
Author

UncertainData.jl doesn't support analytic propagation of distributions. It appears this is on their radar for Normal distributions, but they cite Measurements.jl as a source of this behavior :).

I am not a statistician by any means, but I did a quick literature search and did not see much for propagation of uniform distributions. I think one approach that would work is tracking arbitrarily-complex piecewise linear distributions/PLDs (of which the uniform and triangular/trapezoidal distributions would be special cases). I would foresee having some concept of difference from a normal distribution to allow approximation by a normal distribution when "close enough".

@giordano
Copy link
Member

@alhirzel you may be interested in this new package: https://github.com/baggepinnen/MonteCarloMeasurements.jl

@mestinso
Copy link

There are practically two options here:

  1. Monte Carlo type analysis (mentioned above) <-- more general approach
  2. Use the standard deviation associated with the error distributions of interest. E.g. for a uniform distribution, that would be (b-a)/sqrt(12). Standard deviations for other distributions are widely available in the literature. The output error distribution can generally be assumed to be normal due to the central limit theorem. Probably no specific action required except for a comment or two in the documentation.

With that said, I think there could be room for specifying degrees of freedom associated with each measurement, which would propagate to the output estimated degrees of freedom. Additionally, likely some helper functions for predicting the expanded uncertainty (ie the uncertainty bounds at a specific level of confidence), which would utilize the degrees of freedom would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants