Hi Rooters,
Every once in a while I have about 10 values of which I need to calculate mean and variance. Which is the fastest way to do so in Root? I’m asking for a quick’n’dirty solution!
Thanks,
- Moritz
Hi Rooters,
Every once in a while I have about 10 values of which I need to calculate mean and variance. Which is the fastest way to do so in Root? I’m asking for a quick’n’dirty solution!
Thanks,
see TMath::Mean, RMS, etc
Rene
Ok great!
Just to see if I understand the code correctly: The standard deviation of the mean (TMath::Mean(…)) is obtained by TMath::RMS(…)/sqrt(n-1), and the variance of the dataset is TMath::RMS(…)*sqrt(n/(n-1)), right?
Why don’t we have TMath::StdDev(…) and TMath::Variance(…)?
Cheers,