fcdf

F cumulative distribution function

Syntax

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

Description

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.

p = fcdf(x,v1,Vv2,'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

p=F(x|ν1,ν2)=0xΓ[(ν1+ν2)2]Γ(ν12)Γ(ν22)(ν1ν2)ν12tν122[1+(ν1ν2)t]ν1+ν22dt

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].

Examples

expand all

Compute F Distribution CDF

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 =
  0.7930  0.8854  0.9481  0.9788  0.9919
F2 = 1 - fcdf(1./x,nu2,nu1)
F2 =
  0.7930  0.8854  0.9481  0.9788  0.9919

More About

See Also

| | | |

Was this topic helpful?