cdfChincInv#
Purpose#
Computes the quantile or inverse of noncentral chi-squared cumulative distribution function.
Format#
- x = cdfChincInv(p, df, nonc)#
- Parameters:
p (NxK matrix, Nx1 vector or scalar) – Probabilities at which to compute the inverse of noncentral chi-squared cumulative distribution function. \(0 < p < 1\).
df (ExE conformable with p) – The degrees of freedom. \(df > 0\).
nonc (ExE conformable with p) – The noncentrality parameter. Note: This is the square root of the noncentrality parameter that sometimes goes under the symbol \(\lambda\). \(nonc > 0\).
- Returns:
x (NxK matrix, Nx1 vector or scalar) – each value of x is the value such that the noncentral chi-squared cdf with df degrees of freedom and nonc noncentrality evaluated at x is equal to the corresponding value of p.
Examples#
// Probabilities
p = { .05, .1, .25, .5, .75, 0.90, 0.95 };
// Degrees of freedom
df = 4;
// Non-centrality parameter
nonc = 2;
print cdfChincInv(p, df, nonc);
The code above returns:
1.7650
2.5583
4.3564
7.1016
10.6736
14.6157
17.3093
Remarks#
For invalid inputs, cdfChincinv()
will return a scalar error code which,
when its value is assessed by function scalerr()
, corresponds to the
invalid input. If the first input is out of range, scalerr()
will return a
1; if the second is out of range, scalerr will return a 2; etc.
See also