Contact

R.QTUKEY Function (Gnumeric)

Statistical Intermediate Gnumeric

Find Gnumeric Studentized-range cutoffs with R.QTUKEY. See native tail examples, Tukey scaling, invalid-parameter traps and large-df approximation limits.

Verification status: 24 selected reference, boundary and advanced-check expressions were recalculated with Gnumeric 1.12.57 ssconvert. Saved identities, the blank input and results were independently checked. Gnumeric 1.12.62 was source-checked only. How formula examples are checked

Validate parameters before inversion: Gnumeric 1.12.57 returned the finite value 1 for three tested invalid parameter sets. That value is not a valid quantile. The current source retains the same inverse path.

Quick answer: =R.QTUKEY(.95,2,10) gives 3.151064183329 in Gnumeric 1.12.57.

Availability and version history

  • Introduced: First introduction is unestablished; the exact name is documented by Gnumeric 1.12.9 release notes. The earlier 1.12.3 note spells the inverse name differently, so it is not used as exact introduction evidence.
  • 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.QTUKEY returns

R.QTUKEY inverts the Studentized-range CDF. Its default answer is the range statistic whose lower-tail probability equals the supplied probability. It returns a cutoff in standardized range units, not a difference between group means. Multiplying by the appropriate standard-error scale is a separate step. Versioned function help.

Syntax and arguments

=R.QTUKEY(probability,nmeans,df[,nranges[,lower_tail[,log_p]]])
Argument Meaning
probability A probability from 0 through 1, or its natural logarithm when log_p is TRUE.
nmeans Integer number of means, at least 2 for the intended model.
df Degrees of freedom; use at least 2 for the supported CDF calculation.
nranges Positive integer number of ranges sharing a denominator; defaults to 1.
lower_tail TRUE by default; FALSE interprets probability as an upper-tail probability.
log_p FALSE by default; TRUE means the first argument is a natural log probability.

Brackets mark optional arguments; do not type them. Current worksheet implementation.

Reproducible examples

The native column comes from saved recalculated formulas. The separate reference column evaluates the stated mathematical model, preserving approximation differences. Results are rounded to twelve decimal places, or thirteen significant digits for small nonzero values; printed precision is not a universal accuracy guarantee.

Formula Gnumeric 1.12.57 result Independent mathematical reference
=R.QTUKEY(.95,2,10) 3.151064183329 3.151064183329
=R.QTUKEY(.95,3,10) 3.876776750013 3.876776750013
=R.QTUKEY(.5,3,10) 1.644688858714 1.644688858714
=R.QTUKEY(.05,3,10,1,FALSE()) 3.876776750013 3.876776750013
=R.QTUKEY(LN(.05),3,10,1,FALSE(),TRUE()) 3.876776750013 3.876776750013
=R.QTUKEY(.95,3,30000) 3.314493155398 3.314658014214
=R.QTUKEY(.95,3,10,2) 4.419053114982 4.419053114982
=R.QTUKEY(0,3,10) 0 0

Practical worksheet

For a 95% familywise cutoff with three means and 10 residual degrees of freedom, =R.QTUKEY(0.95,3,10) gives about 3.876776750013. With equal group sizes of 9 and a pooled mean square of 16, the corresponding Tukey difference threshold is =R.QTUKEY(0.95,3,10)*SQRT(16/9), about 5.169035666684 by independent calculation. Compare the absolute difference between a pair of group means with that threshold.

The common-normal-error and pooled-variance assumptions must be justified outside the function. For unequal sizes 9 and 16, the Tukey–Kramer scaling is SQRT(16/2*(1/9+1/16)); multiplying by the same q cutoff gives about 4.568825215134. This is a stated model calculation, not an additional native worksheet test.

Advanced interpretation and checks

A 5% upper-tail cutoff can be entered as =R.QTUKEY(0.05,3,10,1,FALSE()). Its log-probability counterpart is =R.QTUKEY(LN(0.05),3,10,1,FALSE(),TRUE()). Both agree with the default 0.95 lower-tail calculation in the saved tests. The native CDF-of-quantile check returned 0.95.

With two means and one range, the 95% cutoff equals SQRT(2) times the 97.5th percentile of Student t, about 3.151064183329 at df = 10. For df above 25,000, the CDF used by the inverter switches to its infinite-df approximation. At df = 30,000 the native cutoff is 3.314493155398, versus a finite-df reference of about 3.314658014214.

The saved advanced-check result for =R.PTUKEY(R.QTUKEY(.95,3,10),3,10) was 0.95.

Boundaries and troubleshooting

The lower-tail endpoint p = 0 returned zero. Lower-tail p = 1 and upper-tail p = 0 correspond to an infinite cutoff and produced #NUM!; upper-tail p = 1 returned zero. A natural log probability of zero means probability one, not probability zero. Positive log probabilities and ordinary probabilities outside [0,1] produced #NUM!.

The tested invalid sets nmeans = 1, df = 1 and nranges = 0 each returned 1 at p = 0.5. Reject those inputs explicitly rather than checking only whether the result is numeric. The zero-probability endpoint can bypass these invalid-shape conditions. Numeric output alone therefore does not validate a model.

F5 is genuinely empty, rather than a cell containing an empty string.

Formula Gnumeric 1.12.57 result
=R.QTUKEY(1,3,10) #NUM!
=R.QTUKEY(0,3,10,1,FALSE()) #NUM!
=R.QTUKEY(1,3,10,1,FALSE()) 0
=R.QTUKEY(-.1,3,10) #NUM!
=R.QTUKEY(1.1,3,10) #NUM!
=R.QTUKEY(.5,1,10) 1
=R.QTUKEY(.5,3,1) 1
=R.QTUKEY(.5,3,10,0) 1
=R.QTUKEY(0,1,1,0) 0
=R.QTUKEY(0,3,10,1,TRUE(),TRUE()) #NUM!
=R.QTUKEY(1,3,10,1,TRUE(),TRUE()) #NUM!
=R.QTUKEY("abc",3,10) #VALUE!
=R.QTUKEY(F5,3,10) 0
=R.QTUKEY(.5,3) #N/A
=R.QTUKEY(.5,3,10,1,1,0,1) #N/A

Official evidence and checking scope

The complete callback and inspected calculation helpers are unchanged between these source versions. Both stale and uncached SUM controls recalculated correctly. Native XML retains the function identities; secondary ODF export does not establish execution in another product. GUI entry, other locales and newer-release numerical behavior were not tested.