Contact

RANDFDIST Function (Gnumeric)

Statistical Intermediate Gnumeric Gnumeric 1.1.6

RANDFDIST(df 1,df 2) uses positive numerator and denominator degrees of freedom. The order matters: the ideal mean depends on df 2 and exists only when df 2>2.

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

Quick answer: RANDFDIST(df 1,df 2) uses positive numerator and denominator degrees of freedom. The order matters: the ideal mean depends on df 2 and exists only when df 2>2.

Syntax

=RANDFDIST(df 1,df 2)

Availability and evidence

  • Introduction: Gnumeric 1.1.6 NEWS explicitly lists this new function. This release-history evidence is separate from a native test of that old version.
  • Source support: Registered in the Gnumeric 1.12.62 random plugin. No retirement is established; the last functioning native application version is unverified.
  • Evidence dates: Official Gnumeric source retained October 13–14, 2026 was reviewed October 15. Mathematical controls were independently recalculated October 15. No native application, compiled Gnumeric helper or random generator was executed.

Parameters and source definition

Both arguments are required and strictly positive. Zero or negative degrees of freedom produce #NUM!. The helper receives floating-point values, so positive fractional degrees of freedom are not truncated to integers.

The source obtains Y1 from a gamma distribution with shape df 1/2 and scale 2, and Y2 from one with shape df 2/2 and scale 2. It then returns (Y1*df 2)/(Y2*df 1). These gamma variables correspond to the ideal chi-square quantities used in the F-distribution definition.

This is a nonnegative ratio model. Neither argument is a location, scale, probability or upper bound. Reversing the two degrees of freedom changes the distribution.

Complete worksheet setup

Create FDistributionControls. Put numerator df 5 in B2 and denominator df 10 in B3. In D2 enter =RANDFDIST($B$2,$B$3). It gives a changing variate with no fixed expected draw.

For the ideal mean, enter =B3/(B3-2) in F2; the result is 1.25. For variance enter =2*B3^2*(B2+B3-2)/(B2*(B3-2)^2*(B3-4)) in F3; the result is approximately 1.35416666667. These formulas require denominator df>2 and df>4 respectively.

Deterministic ratio controls

Put the supplied Y1/Y2 pairs in A7:B9. In C7 enter =(A7*$B$3)/(B7*$B$2) and fill down:

Supplied input or fixed count Independent reference result
Y1=5, Y2=10 1.0
Y1=10, Y2=10 2.0
Y1=5, Y2=20 0.5

These are arithmetic controls, not gamma draws captured from Gnumeric. The pair 5,10 gives 1 even though the ideal mean of F(5,10) is 1.25. A ratio evaluated at component means is not generally the mean of the ratio.

A zero supplied Y2 would make this literal denominator invalid. The source’s gamma routines and finite-precision behavior are separate from this positive-input teaching table.

Advanced: reversing degrees of freedom

For independent ideal chi-square components, taking the reciprocal changes F(df 1,df 2) into F(df 2,df 1). Reversing 5 and 10 therefore produces an ideal mean 5/(5-2), approximately 1.66666666667, not 1/1.25=0.8.

This illustrates that the reciprocal of an expected value is generally not the expected reciprocal. If a same-draw reciprocal is needed, reference 1/D2; a separate RANDFDIST(B3,B2) call does not promise the matching reciprocal value.

Advanced: an exact F(2,2) probability control

For the ideal F distribution with both degrees of freedom 2, the cumulative probability at x≥0 is x/(1+x). At x 1 the probability is 0.5, and at x 3 it is 0.75.

The median is therefore 1, but the mean is not finite because denominator df=2. This is a valid positive-parameter distribution despite its missing finite mean. Do not treat acceptance by the random function as permission to use a moment formula outside its domain.

Advanced: distinguish the moment boundaries

With df 1=5 and df 2=3, the ideal mean is 3 but variance is not finite. With df 2=5, both moments are finite. Denominator degrees of freedom control these boundaries even if numerator degrees of freedom are large.

A finite sample of machine results can have a numerical average and variance. That does not establish the existence of the corresponding ideal population moments, and no sample-moment convergence test was performed here.

Error and fractional-parameter controls

=RANDFDIST(0,10), =RANDFDIST(5,0) and =RANDFDIST(-1,10) are #NUM! controls. =RANDFDIST(2.5,10) uses 2.5 without integer truncation and has ideal mean 1.25; its variance differs from the df 1=5 example.

Very small positive shapes can create numerical difficulties in the underlying gamma ratio, and large intermediates can overflow. The guide does not promise strictly positive finite output for every mathematically valid extreme input.

Recalculation and verification limits

The plugin marks this function volatile. Recalculation can replace a result, and the worksheet signature has no seed argument. Exact GUI triggers and saved-file replay were not tested. Separate calls do not promise matched internal drivers, while repeated references to one random cell do not constitute independent observations.

The controls here are independent mathematical or source-branch expectations, not generated samples. Ideal probability distributions are distinct from the finite-resolution implementation. Rounding, underflow, overflow and non-finite intermediates can affect extreme inputs; non-finite numeric results become #NUM!. No native application, compiled Gnumeric helper, random generator, empirical distribution-quality test or file-transfer test was executed. Use explicit finite numeric inputs; text and blank coercion are not certified by these controls.