Hi all!
I’ve had ProbabilityBoundsAnalysis.jl live and as a registered package for a while, but thought I’d make a short post here.
ProbabilityBoundsAnalysis.jl (PBA.jl) allows you to perform rigorous arithmetic operations with random variables given only partial information about marginal distributions and dependencies, and can be considered as a union between IntervalArithmetic.jl and probability theory.
The main type in PBA.jl are probability boxes (p-boxes), which are a set of probability distributions defined by two bounding cdfs. In PBA.jl, cdfs are discretised and stored as an array of intervals with a probability mass attached to each element, which allows us to rigorously bound cdfs (and probability measures).
PBA belongs to imprecise probability, which is a generalisation of probability theory where computations are performed on sets of distributions. There are many other ways to define sets of probabilities, including Possibility Theory (Fuzzy), Evidence Theory, Random Sets and so on. P-boxes however generalise distributions and intervals nicely, and are distributions when the bounds are equal, and are intervals when the bounds are scalars.
A list of operation that can be performed on p-boxes:
- P-box arithmetic (+, -, ×, ÷, ^, min, max)
- Transformations (exp, ln, sin, cos, tan, abs, sqrt, etc.)
- Comparisons (<, ≤, >, ≥, ==)
- Set based operations (∈, ⊆ , ⋂, ∪)
- Other operations (sample, mixture)
Performing arithmetic between probabilistic quantities requires you to specify the dependencies. In PBA.jl all dependencies can be specified as copulas, which are discretised and stored in a similar way to p-boxes. One of the main features of PBA.jl is that you can perform operations without knowing dependencies (copulas). These kind of operations generally yield p-boxes.
A simple example of p-box arithmetic with different dependencies:
julia> using ProbabilityBoundsAnalysis
julia> a = normal(0, 1) # Normal distribution
julia> b = beta( interval(2, 3), 3) # Beta with interval parameter
julia> c = a + b # Default is independence
julia> c2 = conv(a, b, op=+, corr=-0.7) # Specified correlation
julia> c3 = convFrechet(a, b, op=+) # Unknown dependence
julia> mass(c, interval(-3,-1)) # Find prob measure in [-3, -1]
[0.0599999, 0.09] # returns interval
julia> mass(c2, interval(-3,-1))
[0.025, 0.065]
julia> mass(c3, interval(-3,-1))
[0.015, 0.160001]
julia> plot(c, fontsize = 22, col = "red")
julia> plot(c2, fontsize = 22, col = "blue")
julia> plot(c3, fontsize = 22, col = "black")
The documentation is quite limited so far, but some more information can be found there.
Hoping some day it will have the same capabilities as IntervalArithmetic.jl. This is my first package, so always looking for suggestions/ PRs.
Hope this is useful/ interesting for people