# Solving a system of equation involving the chi-square distribution

Consider the system of equations:

\begin{align} 2000 &= \frac{2T}{\chi^2_{2n+2}(1-\alpha)} \\ 2370&= \frac{2T}{\chi^2_{2n}(\alpha)} \\ \end{align}

where $\alpha = 0.90$, $n$ is a degrees of freedom, and $T$ is a cumulative time of experience.

How do I calculate $n$ and $T$?

The difficulty is how to replace $\chi^2_{2n+2}(1-\alpha)$ and $\chi^2_{2n}(\alpha)$ for a clear system of equations.

I tried to approximate the chi-square distribution by the standard normal distribution, but I have not found the solution.

How to calculate $n$ and $T$ from this system?

• Homework or "help-me-to-solve-my-problem-possibly-in-the-next-five-minutes" questions are accepted on this site provided you add some context and say what you know or what you tried, i.e. what's prevent you from finding the right solution. Please update your question, otherwise we'll have to close it. – chl Nov 26 '11 at 12:19
• This question asks how to find $T$ and $n$ from a Poisson rate confidence interval. As an example, a symmetric two-sided 80% confidence interval when $T=521150$ and $2n = 479$ is $[1999.99, 2370.01]$. – whuber Nov 26 '11 at 16:28
• Thanks for your update, @atamaths. (I've removed my downvote.) – chl Nov 26 '11 at 17:46
• I rolled back the latest edits (which changed the first two occurrences of $\alpha$ to $\alpha/2$) because they are inconsistent with the remainder of the question and they make the question inconsistent with the comments and the reply. – whuber Nov 27 '11 at 16:43

You can eliminate $T$ from the two equations, leading to the single equation $$2000 \chi^2_{2n+2}(.1) = 2370 \chi^2_{2n}(.9) \, .$$ I would then solve this equation with a standard root finding method, e.g. uniroot in R. Since one can't expect $n$ be be an integer, this problem should be framed in terms of gamma distributions.
• What is unclear, atamaths? The answer is correct and helpful (in steering you away from looking for integral solutions) and it even references freely available software (uniroot). If you need more information than that, then please specify what is lacking. – whuber Nov 30 '11 at 16:29