Multivariate equivalent to Measurement.jl?

Hey,

I would like to propagate a second order moment around a value, a lot like what Measurements.jl does, but multivariate.

n = 10
x = ones(n)
gamma = randn(n,n)
V = gamma'gamma # this should now be a variance covariance matrix. 

# We now assume that the value x has "uncertainty" given by the variance covariance matrix V

# Thus, e.g., the uncertainty associated with x[1] is V[1,1]. 
# The uncertainty associated with x[1] - x[1] should be zero. 
# The uncertainty associted with x[1] + x[2] should be V[1,1] + V[2,2] + 2V[1,2]
# What would be the uncertainty of a given function f(x) ?

In the univariate case, this is precisely what Measurements.jl does, by overloading standard operations to provide this uncertainty propagation. But is there a package to do it in a multivariate case ?


I have an idea but i am not sure this is correct. The idea is to “reduce” to Measurements.jl capacities by simply using the gamma matrix to “standardize” x :

y = gamma \ x
# y is now suppose to be "standardized", and thus : 
y_mes = y .\pm 1
x_mes = gamma * y 
# x_mes now has the wanted uncertainty V

Would that be enough ? Assuming the output of the function f(x), the value which i want the uncertainty from, is univariate, maybe Measurements.jl would be enough ? In real word applications, obtaining the gamma matrix is done by matrix square root or something like that.