Main Content


F cumulative distribution function


p = fcdf(x,v1,v2)
p = fcdf(x,v1,v2,'upper')


p = fcdf(x,v1,v2) computes the F cdf at each of the values in x using the corresponding numerator degrees of freedom v1 and denominator degrees of freedom v2. x, v1, and v2 can be vectors, matrices, or multidimensional arrays that are all the same size. A scalar input is expanded to a constant matrix with the same dimensions as the other inputs. v1 and v2 parameters must contain real positive values, and the values in x must lie on the interval [0 Inf].

p = fcdf(x,v1,v2,'upper') returns the complement of the F cdf at each value in x, using an algorithm that more accurately computes the extreme upper tail probabilities.

The F cdf is


The result, p, is the probability that a single observation from an F distribution with parameters ν1 and ν2 will fall in the interval [0 x].


collapse all

The following illustrates a useful mathematical identity for the F distribution.

nu1 = 1:5;
nu2 = 6:10;
x = 2:6;

F1 = fcdf(x,nu1,nu2)
F1 = 1×5

    0.7930    0.8854    0.9481    0.9788    0.9919

F2 = 1 - fcdf(1./x,nu2,nu1)
F2 = 1×5

    0.7930    0.8854    0.9481    0.9788    0.9919

Extended Capabilities

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

Version History

Introduced before R2006a

See Also

| | | |