## Chi-Squared distributions, non-parametric tolerance intervals, and solving the inverse regularized gamma function…for a?

Conover's book on non-parametric statistics gives as equation 1 in section 3.3 a formula for finding the sample size required to yield a given tolerance interval, namely $n\approx\frac{1}{4}x_{1-\alpha}\frac{1+q}{1-q}+\frac{1}{2}\left(r+m-1\right)$ where $n$ is the sample size, $\alpha$ is the confidence level, $q$ is the proportion of the population encompassed by the tolerance interval, $r$ is the index of the lower order statistic, $x_{1-\alpha}$ is the $1-\alpha$'th quantile from a chi-squared distribution with $2\left(r+m\right)$ degrees of freedom, and $m$ governs the width of the interval measured in terms of the number of order statistics involved ($s=n+1-m$ where $s$ is the index of the upper order statistic in the interval). Trying to solve this for the size of the tolerance interval (roughly put that is, we are actually solving for $r+m$ here) yields $r+m=2n-\frac{1}{2}x_{1-\alpha}\frac{1+q}{1-q}+1$. From here, we can apply the fact that the $p$'th quantile of the chi-squared distribution with $v$ degrees of freedom is $x_p=2Q^{-1}\left(\frac{v}{2},0,p\right)$ where $Q^{-1}\left(a,0,x\right)$ is the inverse regularized gamma function of $a$ and $x$ (thank you, Wolfram Alpha, for the table that allowed me to figure that out); however, I have no idea how one would solve that for $v$. Has this even been attempted before, or am I insane?

-
 "I have no idea how one would solve that for $v$" - apparently you can't avoid Newton-Raphson... – J. M. Oct 14 2011 at 13:20