Contact

GAMMAINV in WPS Spreadsheet: Find a Gamma Cumulative Quantile

Statistical Intermediate WPS Spreadsheet

Use WPS GAMMAINV for interior cumulative probabilities, keep shape and scale explicit and check quantiles against the gamma CDF identity.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =GAMMAINV(1-3*EXP(-2),2,2) has independent expected value approximately 4. It finds x whose lower gamma cumulative probability equals the supplied probability.

Syntax and inverse direction

=GAMMAINV(probability,alpha,beta)

The lesson defines the inverse through GAMMADIST(x,alpha,beta,TRUE) = probability. Therefore the input is a lower cumulative probability, not a density or an upper-tail probability. Shape alpha and scale beta are positive. Their scale meaning follows the gamma density and the explicit inverse relationship.

These examples use probabilities strictly between 0 and 1 and small positive integer shapes. The article’s formal probability inequality is truncated, so this guide does not assert exact endpoint behavior or error tokens for probabilities outside that interior interval.

Complete worksheet example

Enter A2 = 0.5939941502901619, B2 = 2 and C2 = 2 as numbers, labelled Lower probability, Shape and Scale. In D2 enter =GAMMAINV(A2,B2,C2). The independent expected result is approximately 4, subject to the decimal input’s rounding.

For a cleaner mathematical check, enter =GAMMAINV(1-3*EXP(-2),2,2) separately. For shape 2 and scale 2, F(x) = 1−exp(−x/2)×(1+x/2). Substituting x = 4 gives exactly the expression supplied as the probability. This establishes the expected inverse value without copying a vendor output.

A displayed answer of 4 would still be a numerical result, not proof of exact binary equality. Keep the full probability expression when checking the result, rather than a heavily rounded displayed probability.

Additional scale and shape controls

Formula Independent expected quantile
=GAMMAINV(1-3*EXP(-2),2,2) 4
=GAMMAINV(1-3*EXP(-2),2,1) 2
=GAMMAINV(1-EXP(-1),1,2) 2
=GAMMAINV(1-EXP(-2),1,3) 6

At fixed shape and probability, halving scale halves the quantile. For shape 1, the CDF is 1−exp(−x/beta), so each of the final two rows can be checked by simple substitution. Do not confuse a scale of 2 with a rate of 2; the reciprocal rate is 0.5.

Advanced use: specify a tail threshold correctly

Suppose the desired lower cumulative probability is 1−3exp(−2), approximately 0.5939941503. Under the stated shape-2, scale-2 model, the corresponding threshold is 4. The probability above that threshold is 3exp(−2), approximately 0.4060058497.

If the quantity you start with is an upper-tail probability q, first identify the intended lower probability 1−q. Passing q directly would ask for a different quantile. Keep labels such as “lower probability” and “threshold in input units” beside the cells to avoid reversing this direction.

A model quantile does not guarantee that real observations will remain below it. The function does not fit a distribution, validate assumptions or supply a confidence interval for estimated parameters.

Errors and numerical limits

The lesson documents #VALUE! for nonnumeric arguments and #NUM! for nonpositive shape or scale. Thus =GAMMAINV("bad",2,2) and =GAMMAINV(0.5,0,2) are documentary error controls.

The historical article describes an iterative search and a failure condition, but this guide does not certify an iteration limit or convergence guarantee for an unspecified current build. Extreme tails can be numerically sensitive. The small interior examples establish mathematical expectations only; they do not measure implementation accuracy.

The lesson’s complete demonstration uses probability 0.1223, shape 12 and scale 23, displaying 187.2215792. That is historical vendor documentation, distinct from the original hand-checkable examples here. No modern dotted-name alias or cross-platform equivalence is inferred.

Evidence and version scope

The official WPS Academy GAMMAINV lesson, published 2019-06-19, was rechecked on October 19, 2026. The lesson’s applicability field is blank. Its edition and operating-system scope are therefore unspecified. The publication date is evidence that the function was documented by that date, not its introduction date. Exact numeric builds, first and last supported versions remain unknown. The lesson does not establish retirement or deprecation, or parity across platforms and editions.

These are original documentation-based examples with independently calculated expected values. They were not executed in WPS. Vendor demonstrations are historical documentation, not our application tests. Display rounding, client precision and workbook interchange remain unverified; the extra digits in this guide are mathematical reference values. English function names and comma separators follow the lesson.

  • EXP: construct the exact probability expressions used here.
  • LN: derive shape-1 gamma quantiles mathematically.
  • STANDARDIZE: rescale a value, a different operation from finding a quantile.