Evaluates the noncentral chi-squared cumulative probability
distribution function.
Namespace: Imsl.StatAssembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax public static double Noncentralchi(
double chsq,
double df,
double alam
)
Public Shared Function Noncentralchi (
chsq As Double,
df As Double,
alam As Double
) As Double
public:
static double Noncentralchi(
double chsq,
double df,
double alam
)
static member Noncentralchi :
chsq : float *
df : float *
alam : float -> float
Parameters
- chsq
- Type: SystemDouble
A double scalar value representing the argument at which the
function is to be evaluated.
- df
- Type: SystemDouble
A double scalar value representing the number of degrees of
freedom. df must be positive.
- alam
- Type: SystemDouble
A double scalar value representing the noncentrality
parameter. This must be nonnegative, and alam + df must be
less than or equal to 200,000.
Return Value
Type:
Double
A
double scalar value representing the probability that a
chi-squared random variable takes a value less than or equal to
chsq.
Remarks
Method
Cdf.Noncentralchi evaluates the distribution function,
F, of a noncentral chi-squared random variable with
df degrees of freedom and noncentrality
parameter
alam, that is, with
,
, and
,
where
is the gamma function.
This is a series of central chi-squared distribution functions with
Poisson weights. The value of the distribution function at the
point
x is the probability that the random variable takes a
value less than or equal to
x.
The noncentral chi-squared random variable can be defined by
the distribution function above, or alternatively and equivalently,
as the sum of squares of independent normal random variables. If
the have independent normal distributions
with means and variances equal to one
and
then
has a noncentral chi-squared
distribution with
degrees of freedom and
noncentrality parameter equal to
With a noncentrality parameter of zero, the noncentral chi-squared
distribution is the same as the chi-squared distribution.
Cdf.Noncentralchi determines the point at which the
Poisson weight is greatest, and then sums forward and backward from
that point, terminating when the additional terms are sufficiently
small or when a maximum of 1000 terms have been accumulated. The
recurrence relation 26.4.8 of Abramowitz and Stegun (1964) is used
to speed the evaluation of the central chi-squared distribution
functions.
See Also