38 TF1* pdf =
new TF1(
"pdf",
"ROOT::Math::tdistribution_pdf(x,3.0)", a,b);
39 TF1* cum =
new TF1(
"cum",
"ROOT::Math::tdistribution_cdf(x,3.0)", a,b);
41 TH1D* quant =
new TH1D(
"quant",
"", 9, 0, 0.9);
43 for(
int i=1; i < 10; i++)
48 for(
int i=1; i<9; i++)
53 for(
int i=0; i < 9; i++) {
54 int nbin = n * (xx[i+1]-xx[i])/3.0 + 1.0;
57 pdfq[i]=
new TH1D(name,
"", nbin,xx[i],xx[i+1] );
58 for(
int j=1; j<nbin; j++) {
59 double x= j*(xx[i+1]-xx[i])/nbin + xx[i];
64 TCanvas *Canvas =
new TCanvas(
"DistCanvas",
"Student Distribution graphs", 10, 10, 800, 700);
65 pdf->
SetTitle(
"Student t distribution function");
66 cum->
SetTitle(
"Cumulative for Student t");
67 quant->
SetTitle(
"10-quantiles for Student t");
82 pdfq[0]->
SetTitle(
"Student t & its quantiles");
86 pdfq[0]->
SetTitle(
"Student t & its quantiles");
87 for(
int i=0; i < 9; i++) {
90 pdfq[i]->
Draw(
"same");
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
double tdistribution_pdf(double x, double r, double x0=0)
Probability density function of Student's t-distribution.
virtual TF1 * DrawCopy(Option_t *option="") const
Draw a copy of this function with its current attributes.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
1-D histogram with a double per channel (see TH1 documentation)}
virtual void SetTitle(const char *title="")
Set function title if title has the form "fffffff;xxxx;yyyy", it is assumed that the function title i...
double tdistribution_quantile(double z, double r)
Inverse ( ) of the cumulative distribution function of the lower tail of Student's t-distribution (td...
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
void Modified(Bool_t flag=1)