I am creating two TRandom3 objects and using them to generate a pair of random numbers using the TRandom3::Gaus() method by giving the variance and mean values. Then I am calculating the covariance matrix using the TPrincipal class and also myself using some linear algebra. I am really surprised to see that covariance calculated by the TPrincipal and my code are very different. Also, the ratio values of variance(allowing the covariance matrix to be normalized) obtained from the covariance matrix are vastly different from the original values given to the TRandom::Gaus method.
Could you point out what is going wrong here.
I am attaching the macro I am using to see the values of covaraince from the Random numbers.
RandomVars.C (1.22 KB)