Main Content

ncfcdf

NoncentralFcumulative distribution function

Syntax

p = ncfcdf(x,nu1,nu2,delta)
p = ncfcdf(x,nu1,nu2,delta,'upper')

Description

p = ncfcdf(x,nu1,nu2,delta)computes the noncentralFcdf at each value inxusing the corresponding numerator degrees of freedom innu1, denominator degrees of freedom innu2, and positive noncentrality parameters indelta.nu1,nu2, anddeltacan be vectors, matrices, or multidimensional arrays that have the same size, which is also the size ofp. A scalar input forx,nu1,nu2, ordeltais expanded to a constant array with the same dimensions as the other inputs.

p = ncfcdf(x,nu1,nu2,delta,'upper')returns the complement of the noncentralFcdf at each value inx, using an algorithm that more accurately computes the extreme upper tail probabilities.

The noncentralFcdf is

F ( x | ν 1 , ν 2 , δ ) = j = 0 ( ( 1 2 δ ) j j ! e δ 2 ) I ( ν 1 x ν 2 + ν 1 x | ν 1 2 + j , ν 2 2 )

whereI(x|a,b) is the incomplete beta function with parametersaandb.

Examples

collapse all

Compare the noncentralFcdf with δ = 10 to theFcdf with the same number of numerator and denominator degrees of freedom (5 and 20 respectively).

x = (0.01:0.1:10.01)'; p1 = ncfcdf(x,5,20,10); p = fcdf(x,5,20); plot(x,p,“- - -”,x,p1,“- - -”)

References

[1] Johnson, N., and S. Kotz.Distributions in Statistics: Continuous Univariate Distributions-2.Hoboken, NJ: John Wiley & Sons, Inc., 1970, pp. 189–200.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced before R2006a