# How to obtain the inverse of the F cumulative distribution based on the F cumulative distribution?

I am currently implementing a application that needs to obtain the inverse of the F (Fisher-Snedecor) cumulative distribution.

I already have a library that contains the F distribution and I can easily obtain the cumulative distribution based on a confidence interval and degrees of freedom.

How can I easly adapt this library to return the INVERSE of the F cumulative distribution?

-
Can this library find values of inverse CDFs for beta distributions? Or can it find values of CDFs for binomial distributions? –  whuber Nov 23 '11 at 20:43
Yes, I've just checked and It can be done for Beta and Binomial distributions. –  Jonas Nov 23 '11 at 20:45
Are you familiar with the bisection method? Could this help you? –  Adam Nov 29 '11 at 3:53
Not really. I solved the problem using the CDF of Beta. I found a simple implementation of the Inverse CDF of Beta through the regular CDF of Beta and, with the formula below, I obtained the Inverse CDF of F. –  Jonas Nov 30 '11 at 11:50

Let $B$ be the inverse CDF of a Beta$(n/2,m/2)$ distribution. The inverse CDF of an $F(m,n)$ distribution evaluated at $\alpha$ equals

$$\frac{n}{m}\left(\frac{1}{B(1-\alpha)}-1\right).$$

This graphic plots the inverse CDF of an $F(2,3)$ distribution and the graph of the preceding expression. The curves coincide.

Source: Johnson & Kotz, Continuous Univariate Distributions--2 (1970), chapter 26.2.

-
Although I have a Beta function, I don't have its inverse. So I'm stuck on the same problem again. Apparently this library I'm using has a lot of distribution functions, but none of their inverse CDF. –  Jonas Nov 24 '11 at 12:55
Apparently, the only inverse available is the Inverse-Gamma. –  Jonas Nov 24 '11 at 13:07
Then you will need to find your inverse CDFs by root finding. Newton's method should work well. –  whuber Nov 25 '11 at 15:02