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

Upper bound to error propagator

Open ffreyer opened this issue 5 years ago • 0 comments

Saving the full covariance matrix can be expensive, as it uses O(N^2) memory (where N is the number of inputs). A way to get around this would be to use an upper/lower limit for the covariance matrix.

Cauchy Schwarz tells us that |<u, v>|^2 <= <u><v>, i.e.

-var(x)var(y) <= cov(x, y)^2 <= var(x)var(y)

(see also Pearsons correlation coefficient) With the variance of f given by sum_ij df/dx_i df/x_j cov(x_i, x_j) we can calculate an upper limit:

var(f) <= sum_ij | df/dx_i df/dx_j sqrt(var(x_i) var (x_j)) |

This only requires O(N) memory, where N is the number of arguments.

ffreyer avatar Oct 01 '19 14:10 ffreyer