2.2.5.17. Student Law
Warning
This distribution is available only if the ROOT “mathmore” feature has been installed when your
ROOT version was brought (you can check this by running root-config --has-mathmore.
If not found, this law cannot be used.
The Student law is simply defined with a single parameter: the degree-of-freedom (DoF). The probability density function is then set as
where \(\Gamma\) is the Euler’s gamma function.
Uranie code to simulate an student random variable is:
tds = DataServer.TDataServer("tdssampler", "Sampler Uranie demo")
tds.addAttribute(DataServer.TStudentDistribution("stu", 5))
fsamp = Sampler.TSampling(tds, "lhs", 300)
fsamp.generateSample() # Create a representative sample
tds.Draw("stu")
Figure 2.30 shows the PDF, CDF and inverse CDF generated for different sets of parameters.
Figure 2.30 Example of PDF, CDF and inverse CDF for Student distributions.
Is it also possible to set boundaries to the infinite span of this distribution to create a truncated Student law. This can be done by calling the following method:
tds.getAttribute("stu").setBounds(-1.4,2.0) # truncate the law
The resulting PDF, CDF and inverse CDF, with and without truncation, can be seen, in this case, in Figure 2.31 for a given set of parameters and various boundaries.
Figure 2.31 Example of PDF, CDF and inverse CDF for a Student truncated distribution.