Find the degrees of freedom of a F distribution given its 97.5th percentile Let's suppose I have a F distribution $f$ with unknown degrees of freedom $df_{numerator}=df_{denominator}=df$.
If I know the 97.5th percentile $f_{0.975}$ such that $P(f>f_{0.975})=0.025$, is it possible to calculate $df$ in closed form?
For example, given $f_{0.975}=50$, then $df \approx 1.835$. In fact (using Stata)
. di invF(1.835,1.835,0.975)
50.04093

(I found the value $df\approx1.835$ with a loop, but I'd like to avoid doing that).
 A: I think the simplest possible non-closed-form expression is the following:
Denote $d$ the common degrees of freedom, $F_X(x;d,d)$ the CDF of the F-distribution with common degrees of freedom, and $I$ the regularized beta function.
Then for given $\tilde x$ we have (exploiting some simplifications due to the common degrees of freedom)
$$F_X(\tilde x;d,d) = I_{\frac {\tilde x}{1+\tilde x}}\left(\frac d2,\frac d2\right)=\frac {B\left(\frac {\tilde x}{1+\tilde x};\frac d2,\frac d2\right)}{B\left(\frac d2,\frac d2\right)} = q_1$$
where $B(\cdot \;;\cdot,\cdot)$ is the incomplete beta function and $B(\cdot,\cdot)$ the Beta function.  
By the properties of the regularized Beta function we have
$$I_{\frac {\tilde x}{1+\tilde x}}\left(\frac d2,\frac d2\right) = 1- I_{\frac {1}{1+\tilde x}}\left(\frac d2,\frac d2\right) \Rightarrow I_{\frac {1}{1+\tilde x}}\left(\frac d2,\frac d2\right) = 1-q_1 = \frac {B\left(\frac {1}{1+\tilde x};\frac d2,\frac d2\right)}{B\left(\frac d2,\frac d2\right)}$$
Using these two results we have
$$\frac {B\left(\frac {\tilde x}{1+\tilde x};\frac d2,\frac d2\right)}{q_1} = \frac {B\left(\frac {1}{1+\tilde x};\frac d2,\frac d2\right)}{1-q_1}$$
$$\Rightarrow (1-q_1)\int_0^{\frac {\tilde x}{1+\tilde x}}(t-t^2)^{d/2 -1}dt - q_1\int_0^{\frac {1}{1+\tilde x}}(t-t^2)^{d/2 -1}dt = 0$$
...which looks a bit less nightmarish than the picture @whuber's comment describes.
