Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0
Syntax
C# |
---|
public static double NoncentralChi( double chsq, double df, double alam ) |
Visual Basic (Declaration) |
---|
Public Shared Function NoncentralChi ( _ chsq As Double, _ df As Double, _ alam As Double _ ) As Double |
Visual C++ |
---|
public: static double NoncentralChi( double chsq, double df, double alam ) |
Parameters
- chsq
- Type: System..::.Double
A double scalar value at which the function is to be evaluated. chsq must be nonnegative.
- df
- Type: System..::.Double
A double scalar value representing the number of degrees of freedom. df must be positive.
- alam
- Type: System..::.Double
A double scalar value representing the noncentrality parameter. alam must be nonnegative.
Return Value
A double scalar value representing the probability density associated with a noncentral chi-squared random variable with value chsq.Remarks
The noncentral chi-squared distribution is a generalization of the chi-squared distribution. If are independent, normally distributed random variables with means and variances , then the random variable
is distributed according to the noncentral chi-squared distribution. The noncentral chi-squared distribution has two parameters, which specifies the number of degrees of freedom (i.e. the number of ), and which is related to the mean of the random variables by
The noncentral chi-squared distribution is equivalent to a (central) chi-squared distribution with degrees of freedom, where is the value of a Poisson distributed random variable with parameter . Thus, the probability density function is given by:
where the (central) chi-squared Pdf is given by:
where is the gamma function. The above representation of can be shown to be equivalent to the representation:
Method Pdf.NoncentralChi evaluates the probability density function, , of a noncentral chi-squared random variable with df degrees of freedom and noncentrality parameter alam, corresponding to k = df, = alam, and x = chsq.
With a noncentrality parameter of zero, the noncentral chi-squared distribution is the same as the central chi-squared distribution.