Hello out there,
I’d like to use the Inverse cumulative distribution function provided by RooStats. In doing so I just call the Function as part of a Double_t expression.
using namespace RooStats;
However Root only states that InverseCDF is not defined in current scope.
Am I using the wrong header files?
Does anybody have a solution to this problem because I didn’t found anything in the documentation
I am not sure of what you want to do. SamplingDistribution::InverseCDF( double p) returns the inverse of the empirical cumulative distribution obtained with a vector of data. It is equivalent (although implement differently) to TMath::Quantile (see root.cern.ch/root/htmldoc/TMath. … :Quantiles ).
Actually TMath::Quantiles provides in addition different options to interpolate the different points.
Example to use:
To get the median of a SamplingDistribution you can do:
SamplingDistribution * s = ...
double median = s->InverseCDF(0.5);
double p = 0.5; double q;
TMath::Quantiles(s->GetSize(), 1, &s->GetSamplingDistribution(), q, p, false);