19from ROOT
import TH1D, TF1, TCanvas, kRed, kBlue
24ROOT.Math.MathMoreLibrary.Load()
30pdf =
TF1(
"pdf",
"ROOT::Math::tdistribution_pdf(x,3.0)", a, b)
31cum =
TF1(
"cum",
"ROOT::Math::tdistribution_cdf(x,3.0)", a, b)
34quant =
TH1D(
"quant",
"", 9, 0, 0.9)
44 xx.append(quant.GetBinContent(i))
49 nbin = int(n * (xx[i+1] - xx[i]) / 3.0 + 1.0)
51 pdfq.append(
TH1D(name,
"", nbin, xx[i], xx[i+1]))
52 for j
in range(1, nbin):
53 x = j * (xx[i+1] - xx[i]) / nbin + xx[i]
58Canvas =
TCanvas(
"DistCanvas",
"Student Distribution graphs", 10, 10, 800, 700)
59pdf.SetTitle(
"Student t distribution function")
60cum.SetTitle(
"Cumulative for Student t")
61quant.SetTitle(
"10-quantiles for Student t")
73quant.SetLineColor(kBlue)
76pdfq[0].SetTitle(
"Student t & its quantiles")
79pdfq[0].SetTitle(
"Student t & its quantiles")
1-D histogram with a double per channel (see TH1 documentation)}
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...