# Extracting global correlation causes a seg fault with SumW2Error

**URL:** <https://root-forum.cern.ch/t/extracting-global-correlation-causes-a-seg-fault-with-sumw2error/55138>\
**Category:** Roofit and RooStats\
**Tags:** bug, python\
**Created:** [June 1, 2023, 3:16pm UTC](https://root-forum.cern.ch/t/extracting-global-correlation-causes-a-seg-fault-with-sumw2error/55138 "2023-06-01T15:16:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mwilkins](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mwilkins/32/28332_2.png) [@mwilkins](https://root-forum.cern.ch/u/mwilkins)\
**Post date:** [June 1, 2023, 8:34pm UTC](https://root-forum.cern.ch/t/extracting-global-correlation-causes-a-seg-fault-with-sumw2error/55138/3 "2023-06-01T20:34:32Z")

</div>

I have some fits where the parameters are often correlated, but it’s not always obvious in advance which parameters are going to have high correlations. When this happens, I wanted to pick which of them to fix (to improve fit stability/convergence) by checking which had the higher _global_ correlation.

If I understand your explanation, you cannot correct the global correlations from MINUIT because they do not comprise a correctable matrix, but couldn’t you just calculate corrected global correlations from the corrected matrix? From page 356 of the [original paper](https://www.sciencedirect.com/science/article/pii/0010465575900399), the global correlation coefficients are defined as  
\rho\_k^2 = 1 - [V\_{kk} \* (V^{-1})\_{kk}]^{-1},  
so couldn’t you just define the corrected correlation coefficients as  
(\rho\_{corr})\_k^2 = 1 - [(V\_{corr})\_{kk} \* (V\_{corr}^{-1})\_{kk}]^{-1}  
? Or does the formula break down in that case?

(In any case, yes, a sensible error would be nice. By the way, it would be nice if the `SumW2Error`-corrected errors and correlations were printed, not [just the uncorrected ones](https://root-forum.cern.ch/t/printed-error-differs-from-stored-error-when-using-sumw2error/46832/4)–it’s disorienting that the stored errors differ from the printed ones.)

---

_[View the full topic](https://root-forum.cern.ch/t/extracting-global-correlation-causes-a-seg-fault-with-sumw2error/55138)._
