Example macro describing the student t distribution
It draws the pdf, the cdf and then 10 quantiles of the t Student distribution
{
TF1* pdf =
new TF1(
"pdf",
"ROOT::Math::tdistribution_pdf(x,3.0)",
a,
b);
TF1*
cum =
new TF1(
"cum",
"ROOT::Math::tdistribution_cdf(x,3.0)",
a,
b);
for(int i=1; i < 10; i++)
for(int i=1; i<9; i++)
for(int i=0; i < 9; i++) {
}
}
TCanvas *Canvas =
new TCanvas(
"DistCanvas",
"Student Distribution graphs", 10, 10, 800, 700);
pdf->
SetTitle(
"Student t distribution function");
cum->SetTitle(
"Cumulative for Student t");
quant->SetTitle(
"10-quantiles for Student t");
pdfq[0]->SetTitle(
"Student t & its quantiles");
pdfq[0]->SetTitle(
"Student t & its quantiles");
for(int i=0; i < 9; i++) {
pdfq[i]->SetStats(
false);
pdfq[i]->SetFillColor(i+1);
}
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
void SetTitle(const char *title="") override
Set function title if title has the form "fffffff;xxxx;yyyy", it is assumed that the function title i...
void Draw(Option_t *option="") override
Draw this function with its current attributes.
virtual TF1 * DrawCopy(Option_t *option="") const
Draw a copy of this function with its current attributes.
1-D histogram with a double per channel (see TH1 documentation)
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
void Modified(Bool_t flag=true) override
Mark pad modified Will be repainted when TCanvas::Update() will be called next time.
double tdistribution_pdf(double x, double r, double x0=0)
Probability density function of Student's t-distribution.
double tdistribution_quantile(double z, double r)
Inverse ( ) of the cumulative distribution function of the lower tail of Student's t-distribution (td...
- Author
- Magdalena Slawinska
Definition in file tStudent.C.