Fitting histogram with correlated systematic uncertainties

Dear Experts,

I am a new user. I want to perform a fit of a histogram (with variable bin width) with correlated uncertainties among the bins with the data in Root. I am struggling to implement the correlation matrix (or covariance matrix) in my code.
Is there any sample code regarding this in the repository?

Thanks a lot in advance.

Hi @Srimoy_Bhattacharya,

Take a look at the Manual section Fitting histograms - ROOT.


@jalopezg So, which example there covers the “correlated uncertainties among the bins” case?

Hi @jalopezg , I checked the link you shared.

I am not talking about the correlation among the fit parameters. I want to know how to incorporate “correlated uncertainties among the bins”.

Unfortunately, I could not find any discussion regarding this over there.

Sorry, I skipped over that part.

I am sure @moneta or @jonas can shed some light here.


We don’t have at the moment examples of fitting data where the points have correlated errors.
You need in this case to write yourself the Chi-square function using the correlation matrix.
We have however some example on fitting a user provided method, like this one fitting a 3D line to 3D points (ROOT: tutorials/fit/line3Dfit.C File Reference).

Best regards