Tutorial illustrating the new statistical distributions functions (pdf, cdf and quantile)
void pdf001_Normal() {
TF1 *pdfunc =
new TF1(
"pdf",
"ROOT::Math::normal_pdf(x, [0],[1])",-5,5);
TF1 *cdfunc =
new TF1(
"cdf",
"ROOT::Math::normal_cdf(x, [0],[1])",-5,5);
TF1 *ccdfunc =
new TF1(
"cdf_c",
"ROOT::Math::normal_cdf_c(x, [0])",-5,5);
TF1 *qfunc =
new TF1(
"quantile",
"ROOT::Math::normal_quantile(x, [0])",0,1);
TF1 *cqfunc =
new TF1(
"quantile_c",
"ROOT::Math::normal_quantile_c(x, [0])",0,1);
legend1->
AddEntry(pdfunc,
"normal_pdf",
"l");
legend2->
AddEntry(cdfunc,
"normal_cdf",
"l");
legend2->
AddEntry(ccdfunc,
"normal_cdf_c",
"l");
legend3->
AddEntry(qfunc,
"normal_quantile",
"l");
legend3->
AddEntry(cqfunc,
"normal_quantile_c",
"l");
}
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetNpx(Int_t npx=100)
void SetTitle(const char *title="") override
Set the title of the TNamed.
void Draw(Option_t *option="") override
Default Draw method for all objects.
virtual void SetParameters(const Double_t *params)
virtual void SetParameter(Int_t param, Double_t value)
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
void Draw(Option_t *option="") override
Draw this box with its current attributes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
- Author
- Anna Kreshuk
Definition in file pdf001_Normal.C.