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. p must 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 df must 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

\[P = \int_{-\infty}^{t_0}\frac {v^{v/2}e^{-\delta^2/2}} {\sqrt{\pi}\mathit{\Gamma}(v/2)\left(v+x^2\right)^{(v+1)/2}} \sum_{i=0}^{\infty}\mathit{\Gamma}((v+i+1)/2) \left(\frac{\delta^i}{i!}\right) \left(\frac{2x^2}{v+x^2}\right)^{i/2}dx\]

where Γ(⋅) is the gamma function. In other words:

\[F^{-1} = (P|\mathit{df},\mathit{delta}) = x\]

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.