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.
Minimal Example:
#include "RooStats/SamplingDistribution.h"
using namespace RooStats;
void func(){
Double_t mu,alpha=0.05,beta=0.16;
mu=(InverseCDF(beta)+alpha)*4.;
}
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);