Main Content


Noncentral F inverse cumulative distribution function


X = ncfinv(P,NU1,NU2,DELTA)


X = ncfinv(P,NU1,NU2,DELTA) returns the inverse of the noncentral F cdf with numerator degrees of freedom NU1, denominator degrees of freedom NU2, and positive noncentrality parameter DELTA for the corresponding probabilities in P. P, NU1, NU2, and DELTA can be vectors, matrices, or multidimensional arrays that all have the same size, which is also the size of X. A scalar input for P, NU1, NU2, or DELTA is expanded to a constant array with the same dimensions as the other inputs.


One hypothesis test for comparing two sample variances is to take their ratio and compare it to an F distribution. If the numerator and denominator degrees of freedom are 5 and 20 respectively, then you reject the hypothesis that the first variance is equal to the second variance if their ratio is less than that computed below.

critical = finv(0.95,5,20)
critical =

Suppose the truth is that the first variance is twice as big as the second variance. How likely is it that you would detect this difference?

prob = 1 - ncfcdf(critical,5,20,2)
prob =

If the true ratio of variances is 2, what is the typical (median) value you would expect for the F statistic?

ans = 


[1] Evans, M., N. Hastings, and B. Peacock. Statistical Distributions. Hoboken, NJ: Wiley-Interscience, 2000.

[2] 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™.

Version History

Introduced before R2006a