Contact

RANDGUMBEL Function (Gnumeric)

Statistical Intermediate Gnumeric

Generate Gnumeric extreme-value variates with RANDGUMBEL, using the implemented type 1 and type 2 parameterizations rather than assumed moments.

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

RANDGUMBEL generates a random variate using one of two extreme-value distribution formulas. Gnumeric’s parameters are a and b; they must not be casually interpreted as a mean and standard deviation. The type selector changes the distribution and the meaning of a transformed sample.

Syntax and parameterization

RANDGUMBEL(a, b, [type])

type defaults to 1. Only 1 and 2 are accepted; another selector returns #NUM!. Use positive a and b for the distribution parameterizations described here. The worksheet callback does not provide a comprehensive guard for their domains, so the absence of a friendly parameter error is not evidence that an arbitrary input defines a valid distribution.

The pinned generator draws a uniform u strictly between zero and one, rejecting zero, then computes:

  • Type 1: (LN(b)-LN(-LN(u)))/a
  • Type 2: (-b/LN(u))^(1/a)

For positive parameters, type 1 can return positive or negative real values; type 2 returns positive values. The same a and b do not imply that the two types share a mean, variance, or scale interpretation.

Worked examples

=RANDGUMBEL(1,1) draws from type 1. =RANDGUMBEL(1,1,2) draws from type 2. These are random results, so a particular decimal output cannot be reproduced merely by re-entering the formula. The expected property is the distribution/domain, not a fixed number.

To understand the parameterization independently, substitute the illustrative fixed input u=EXP(-1) into the formulas above. With a=b=1, type 1 yields 0 and type 2 yields 1. These are deterministic transform calculations, not native random draws or a seed mechanism.

=RANDGUMBEL(1,1,3) returns #NUM!, demonstrating the selector guard. The retained native run returned about 0.206899498908376 for type 1 and 9.730878204337245 for type 2. Those are single observed draws, not fixed expected values.

Advanced use: construct a location-scale model

For type 1, with a positive scale s and desired location m, the generator formula can be written m-s*LN(-LN(u)) by choosing a=1/s and b=EXP(m/s). An alternative is to put a standard type-1 draw in A2 and calculate m+s*A2 in another cell. The latter keeps the transformation visible and avoids forming a very large exponential for extreme m/s.

Neither m nor s is automatically the mean or standard deviation of the resulting extreme-value distribution. Choose a parameter convention from the model being implemented and document it beside the inputs. Do not copy a parameter pair from a different package without checking its definition.

Errors and limitations

Do not test a=0 as a way to obtain a constant: the generator divides by a or uses its reciprocal. Negative or zero b is outside the positive-parameter contract used here. Extreme parameters can cause floating-point overflow or underflow even when the symbolic model is meaningful.

The function is volatile. Store the draw once and reference that cell when several calculations must share a scenario. Save values separately when a report must remain stable. These bounded examples do not validate tail accuracy or the quality of an estimated extreme-risk model.

Version and verification

The release notes introduce RANDGUMBEL in Gnumeric 1.1.6 among new random-distribution functions. The formulas here are pinned to official 1.12.57 source. The selected examples were recalculated by the actual Gnumeric 1.12.57 engine under C.UTF-8 on 17 October 2026. No GUI execution, newer-version equivalence, retirement, or last-working-release claim is made.

RAND, LN, EXP.

Official references