  ## Tech Tips: F Distribution

### Calculating Heights of Points on the Graph of the F Distribution Function

To calculate the height at $x$ of the graph of the F Distribution function with $dfn$ degrees of freedom associated with the numerator and $dfd$ degrees of freedom associated with the denominator,

• R: use the function

dF(x,dfn,dfd)


• Excel: use the function

F.DIST(x, dfn, dfd, FALSE)

The last argument for this function, when $FALSE$, indicates that the height of the function should be returned, instead of an area under the curve.

### Calculating F Distribution Probabilities

To calculate the area to the left of some $x$ and under a curve corresponding to a F distribution with $dfn$ degrees of freedom associated with the numerator and $dfd$ degrees of freedom associated with the denominator,

• R: use the function

pf(x,dfn,dfd)


• Excel: use the function

F.DIST(x, dfn, dfd, TRUE)


The last argument for this function, when $TRUE$, indicates the probability returned should be an area under the curve and not a height of the function's graph.

### Inverse Calculations with the F Distribution

To find the cut-off $x$-value for which a random variable following a F distribution with $dfn$ degrees of freedom associated with the numerator and $dfd$ degrees of freedom associated with the denominator will produce an outcome less than $x$ with some given probability of $p$ (or, said another way, to find the $x$ value where there is an area of $p$ to the left of $x$ and under the related F distribution curve) ...

• R: use the function

qf(p,dfn,dfd)

• Excel: use the function

F.INV(p,dfn,dfd)


### Generating Random Data Following an F Distribution

To generate $n$ values randomly selected from a F distribution with $dfn$ degrees of freedom associated with the numerator and $dfd$ degrees of freedom associated with the denominator,

• R: use the function

rf(n,dfn,dfd)


• Excel: copy the formula below to $n$ cells

F.INV(RAND(),dfn,dfd)