R.QCHISQ Function (Gnumeric)
Find chi-square cutoffs with Gnumeric R.QCHISQ. Select lower or upper probability, use log input and distinguish finite from infinite endpoints.
Verification status: 22 reference, boundary and advanced-check formulas were recalculated with Gnumeric 1.12.57 ssconvert. Saved identities, the blank input and numerical results were independently checked. Gnumeric 1.12.62 was source-checked only. How formula examples are checked
Quick answer: =R.QCHISQ(.5,2) gives 1.38629436112 in Gnumeric 1.12.57.
Availability and version history
- Introduced: First release not established; present in the retained 1.12.57 source.
- Supported in: Gnumeric 1.12.62; no retirement is established.
- Scope: Desktop Gnumeric with its Statistical Functions From R plugin. English comma-separated formulas are shown.
- Checked: October 14, 2026. Tables and the named advanced check use 1.12.57 ssconvert. Current 1.12.62 source was inspected; that release was not executed.
What R.QCHISQ returns
R.QCHISQ returns a chi-square quantile, using lower-tail probability by default. With lower_tail FALSE it returns a cutoff for the specified right-tail probability. Degrees of freedom may be positive real values. Versioned function help.
Syntax and arguments
=R.QCHISQ(probability,degrees_freedom[,lower_tail[,log_p]])
- probability: ordinary probability from 0 to 1, or its natural logarithm when log_p is TRUE.
- degrees_freedom: required and positive; not truncated to an integer.
- lower_tail, log_p: optional TRUE and FALSE respectively. The result remains an ordinary cutoff.
Brackets mark optional arguments; do not type them. Current worksheet implementation.
Reproducible examples
These self-contained formulas were recalculated natively. Ordinary-domain results were checked against independent mathematics; invalid-model observations are identified separately below. Results are rounded to twelve decimal places, or thirteen significant digits for small nonzero values. This is presentation precision, not a universal accuracy guarantee.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=R.QCHISQ(.5,2) |
1.38629436112 |
=R.QCHISQ(.95,2) |
5.991464547108 |
=R.QCHISQ(.95,4) |
9.487729036781 |
=R.QCHISQ(.05,4,FALSE()) |
9.487729036781 |
=R.QCHISQ(LN(.05),4,FALSE(),TRUE()) |
9.487729036781 |
=R.QCHISQ(.5,2.5) |
1.873847767781 |
=R.QCHISQ(0,2) |
0 |
=R.QCHISQ(.75,6) |
7.840804120585 |
Practical worksheet
For 4 degrees of freedom, the lower-tail 95th percentile is approximately 9.487729036781. Request the same upper-tail 5% cutoff with =R.QCHISQ(0.05,4,FALSE()). This is the tail setting needed for a conventional right-tail 5% critical value.
For 2 degrees of freedom, the lower-tail 95th percentile is approximately 5.991464547108. The closed form -2*LN(1-0.95) provides a separate mathematical check in this particular case.
Advanced interpretation and checks
A central 90% interval for the distribution of X itself uses lower-tail probabilities 0.05 and 0.95. It is not automatically a confidence interval for an unknown variance; that requires an appropriate model, sample variance and the reciprocal-quantile construction.
The saved advanced check compares the 4-degree 95th percentile with a gamma quantile using shape=2 and scale=2. A logged upper-tail input, LN(0.05) with FALSE and TRUE as the last two arguments, gives the same cutoff as the ordinary upper-tail call.
The saved advanced-check result for =R.QCHISQ(.95,4)-R.QGAMMA(.95,2,2) was 0.
Boundaries and troubleshooting
Zero and negative degrees of freedom are rejected by this inverse, even though some related density/CDF functions contain zero-degree limit branches. Do not assume the family shares identical input guards.
For positive degrees, lower-tail probability 0 gives zero and probability 1 gives an infinite cutoff, displayed as #NUM!. Upper-tail endpoints reverse these outcomes. Log input 0 means probability 1; a positive log-probability is invalid. A blank probability becomes zero, which is a valid finite lower endpoint, not a missing-data warning.
F5 is genuinely empty, rather than a cell containing an empty string. #NUM! can represent an unrepresentable infinite mathematical endpoint as well as an invalid numeric domain; the distinctions above matter.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=R.QCHISQ(1,2) |
#NUM! |
=R.QCHISQ(0,2,FALSE()) |
#NUM! |
=R.QCHISQ(1,2,FALSE()) |
0 |
=R.QCHISQ(-.1,2) |
#NUM! |
=R.QCHISQ(1.1,2) |
#NUM! |
=R.QCHISQ(.5,0) |
#NUM! |
=R.QCHISQ(.5,-1) |
#NUM! |
=R.QCHISQ(0,2,TRUE(),TRUE()) |
#NUM! |
=R.QCHISQ(1,2,TRUE(),TRUE()) |
#NUM! |
=R.QCHISQ("abc",2) |
#VALUE! |
=R.QCHISQ(F5,2) |
0 |
=R.QCHISQ(.5) |
#N/A |
=R.QCHISQ(.5,2,1,0,1) |
#N/A |
Official evidence and checking scope
- Current worksheet callback
- Tested-version worksheet callback
- Current qchisq calculation
- Tested-version qchisq calculation
- Current qgamma calculation
- Tested-version qgamma calculation
- Nonfinite worksheet-value handling
- Statistical Functions From R plugin declaration
The relevant complete worksheet callback and main calculation helper are unchanged between the inspected versions. That does not establish later-version numerical execution. Both stale and uncached SUM controls recalculated correctly. Native XML preserves the R.* identities. Secondary ODF export maps two-argument R.DCHISQ to CHISQDIST with FALSE, R.PCHISQ to CHISQDIST, and R.QCHISQ to CHISQINV; additional arguments retain ORG.GNUMERIC names. These storage mappings do not establish execution in another product. GUI entry, other locales and other spreadsheet products were not tested.