nonCentralTInvCdf¶
Evaluates the inverse of the noncentral Student’s t distribution function.
Synopsis¶
nonCentralTInvCdf(p, df, delta)
Required Arguments¶
- float
p(Input) - A Probability for which the inverse of the noncentral Student’s t
distribution function is to be evaluated.
pmust be in the open interval (0.0, 1.0). - int
df(Input) - Number of degrees of freedom of the noncentral Student’s t
distribution. Argument
dfmust be greater than or equal to 0.0 - float
delta(Input) - The noncentrality parameter.
Return Value¶
The probability that a noncentral Student’s t random variable takes a
value less than or equal to t is p.
Description¶
Function nonCentralTInvCdf evaluates the inverse distribution function
of a noncentral t random variable with df degrees of freedom and
noncentrality parameter delta; that is, with P = p, v = df,
and δ = delta, it determines \(t_0\) (= nonCentralTInvCdf
(p, df, delta)), such that
where Γ(⋅) is the gamma function. In other words:
The probability that the random variable takes a value less than or equal to
\(t_0\) is P. See nonCentralTCdf for an
alternative definition in terms of normal and chi-squared random variables.
The function nonCentralTInvCdf uses bisection and modified regula falsi
to invert the distribution function, which is evaluated using function
nonCentralTCdf.
Example¶
In this example, we find the 95-th percentage point for a noncentral t random variable with 6 degrees of freedom and noncentrality parameter 6.
from __future__ import print_function
from numpy import *
from pyimsl.stat.nonCentralTInvCdf import nonCentralTInvCdf
p = 0.95
df = 6
delta = 6.0
t = nonCentralTInvCdf(p, df, delta)
print("The 0.05 noncentral t critical value is %6.3f." % t)
Output¶
The 0.05 noncentral t critical value is 11.995.