UncertaintyQuantification.jl icon indicating copy to clipboard operation
UncertaintyQuantification.jl copied to clipboard

Interval on mean and standard deviation for distributions that are not normal

Open teobros opened this issue 6 months ago • 2 comments

We should have a way to define an interval on the mean and standard deviation for distributions that are not normal. Then we should use the distribution_parameters function to compute the corresponding "interval" for the P-box. However, the problem is not that trivial, because a box on mu and sigma will not transform to a box in the distribution parameters!

  • How do we do the mapping efficiently? (maybe interval arithmetics?)
  • How we pass the non-boxy space in the distribution parameters to the P-box constructor?

teobros avatar Jun 11 '25 14:06 teobros

Interesting. I guess there are known formulas for getting the distribution parameters from the moments (and vice versa)?

A couple of points/ideas:

  • We have a parameterisation in terms of (box) moments:

    • For 2-loop Monte Carlo just optimise over these parameters (through the formulas)
    • For interval MC, for each alpha you need to min/max the cdf (optimisation required, but not expensive)
  • A similar idea to above, but with interval arithmetic (as suggested):

    • Just compute a box (perhaps too conservative) for the parameters
    • Do sub-intervalisation, and have a finite (~100-200) number of boxes / distributions. Gives a non-box for the parameters (set is a union of boxes). Interval MC is then easy, but the optimisation space for 2-loop is strange.
  • Some combination of above two. Perhaps each cdf bound is determined by a small number of distributions? So we just need to store these distributions, and the alpha values the transition happens at

I find the 1st easiest

AnderGray avatar Jun 11 '25 18:06 AnderGray

It depends on the random variable. Often you have analytical formulas, sometimes they are complex and involve inverting numerical relations with no close solution. I think converting box to box might be the easiest, but obviously it will loose the depency of the parameters and may allow some "non-physical" part of the input space (but this is the case also when you give the box directly on the parameters, it's the same problem that appears on the constraint of the moments - see e.g. the staircase distribution of Crespo).

I did a quick an dirty test with interval arithmetics and only 2 distributions. It seem like it miracoulously works...

using UncertaintyQuantification
using IntervalArithmetic, IntervalBoxes, IntervalArithmetic.Symbols

μ = interval(10,20)
σ = interval(1,2)

m,v=distribution_parameters(μ,σ,LogNormal)
m
v
# Can you plot interval areas and boxes?
#using Plots
#plot(m,v)
a,b=distribution_parameters(μ,σ,Gumbel)
a

mu_sigma=IntervalBox(10..20,1..2)
mu_sigma
mu_sigma.v
a,b=distribution_parameters(mu_sigma.v...,Gumbel)
m,v=distribution_parameters(mu_sigma...,LogNormal)
m,v=distribution_parameters(μ,σ,LogNormal)

teobros avatar Jun 17 '25 13:06 teobros