19from ROOT
import TH1D, TF1, TCanvas, kRed, kBlue
25ROOT.Math.MathMoreLibrary.Load()
31pdf =
TF1(
"pdf",
"ROOT::Math::tdistribution_pdf(x,3.0)", a, b)
32cum =
TF1(
"cum",
"ROOT::Math::tdistribution_cdf(x,3.0)", a, b)
35quant =
TH1D(
"quant",
"", 9, 0, 0.9)
38 np.array([(i - 0.5) / 10.0
for i
in range(1, 10)]),
46 xx.append(quant.GetBinContent(i))
51 nbin =
int(n * (xx[i+1] - xx[i]) / 3.0 + 1.0)
53 pdfq.append(
TH1D(name,
"", nbin, xx[i], xx[i+1]))
54 for j
in range(1, nbin):
55 x = j * (xx[i+1] - xx[i]) / nbin + xx[i]
60Canvas =
TCanvas(
"DistCanvas",
"Student Distribution graphs", 10, 10, 800, 700)
61pdf.SetTitle(
"Student t distribution function")
62cum.SetTitle(
"Cumulative for Student t")
63quant.SetTitle(
"10-quantiles for Student t")
75quant.SetLineColor(kBlue)
78pdfq[0].SetTitle(
"Student t & its quantiles")
81pdfq[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...