# 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?

-

4
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

1
– 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

## 1 Answer

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.

-

thanks, but how ? the answer is not clear enough – atamaths Nov 27 '11 at 17:09
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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 13, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9216094613075256, "perplexity_flag": "middle"}