RANDRAYLEIGHTAIL Function (Gnumeric)
RANDRAYLEIGHTAIL(a,sigma) generates a Rayleigh tail variate using a lower bound and scale. For the ordinary interpretation use a≥0 and sigma>0; the source squares a and therefore treats a and -a identically.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: RANDRAYLEIGHTAIL(a,sigma) generates a Rayleigh tail variate using a lower bound and scale. For the ordinary interpretation use a≥0 and sigma>0; the source squares a and therefore treats a and -a identically.
Syntax
=RANDRAYLEIGHTAIL(a,sigma)
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 exact interpretation
Both arguments are required. The help identifies a as a lower limit and sigma as scale. The inspected helper rejects negative sigma but does not reject negative a. It retries a zero unit driver and then returns SQRT(a^2-2*sigma^2*LN(U)).
For a≥0 and sigma>0, this is the ideal Rayleigh distribution conditional on being at least a. It is not simply a plus an ordinary Rayleigh variate. Because a is squared, a negative input has the same source transform as its positive magnitude; do not interpret it as a signed negative truncation point.
Complete worksheet setup
Create RayleighTailControls. Put lower bound 4 in B2 and scale 3 in B3. In D2 enter =RANDRAYLEIGHTAIL($B$2,$B$3). D2 is a changing tail variate, with no fixed expected draw.
In F2 enter =SQRT(B2^2+2*B3^2*LN(2)) for the ideal conditional median. In F3 enter =B2^2+2*B3^2 for the ideal second moment. The independent second-moment result is 34; it is the mean of R², not the mean of R.
Deterministic source-transform controls
Put 0.25,0.5 and 0.75 in A7:A9. In B7 enter =SQRT($B$2^2-2*$B$3^2*LN(A7)) and fill down. The independent references are:
| Supplied control inputs | Independent reference result |
|---|---|
| U=.25 | 6.399476423908 |
| U=.5 | 5.33635167976 |
| U=.75 | 4.601986234674 |
The row with U=0.5 also gives the conditional median requested in F2. These controlled inputs are not a claim about which drivers the actual generator will choose. A zero U is retried by the helper, not accepted as a finite logarithmic input.
Advanced: conditional tail probability
For t≥a≥0, the ideal conditional survival probability is EXP(-(t^2-a^2)/(2*sigma^2)). With a 4, sigma 3 and threshold 5, =EXP(-(5^2-B2^2)/(2*B3^2)) gives approximately 0.606530659713. The probability of a conditional value between 4 and 5 is approximately 0.393469340287.
By comparison, the unconditioned Rayleigh probability of exceeding 4 is approximately 0.411112290507. Conditioning removes the outcomes below 4 and rescales the remaining probability to total 1; it is not a separate probability mass assigned to the lower bound.
For thresholds below a, the ideal conditional survival probability is 1. Do not extrapolate the exponential expression to t<a and report a value above 1 as a probability.
Advanced: compare with adding the lower bound
At supplied U=0.5, the correct transform is SQRT(16+18*LN(2)). Adding 4 to an ordinary scale 3 Rayleigh transform instead gives 4+3*SQRT(2*LN(2)), approximately 7.53223006755. These are different models.
The squared-excess identity is simpler: (R^2-a^2)/(2*sigma^2) equals -LN(U) under the transform, and has an ideal scale 1 exponential distribution. In C7 enter =(B7^2-$B$2^2)/(2*$B$3^2) to verify that deterministic identity against A7.
Advanced: recover the ordinary Rayleigh case
With a 0, the formula reduces to sigma*SQRT(-2*LN(U)) for nonnegative sigma, matching the ordinary Rayleigh transform. This establishes a same-driver algebraic relationship; two separate worksheet calls need not return the same random result.
Doubling both a and sigma doubles the same-driver output. Doubling only a does not simply double the result because the random squared-excess term has not changed. Parameter comparisons should specify which quantities are held fixed.
Zero scale and negative-bound extension
=RANDRAYLEIGHTAIL(4,0) yields 4 after an accepted driver; =RANDRAYLEIGHTAIL(-4,0) also yields 4 because SQRT(a²)=ABS(a). With scale 3, bounds 4 and-4 likewise have the same mathematical source mapping. This is an explicitly described implementation extension, not a recommendation to use negative bounds for conditional Rayleigh modeling.
=RANDRAYLEIGHTAIL(4,-3) gives #NUM!. The helper does not early-return at zero scale and may consume generator state. Very large squared parameters can overflow; no extreme native endpoint claims are made.
Recalculation and evidence limits
The plugin registers this function as volatile, so recalculation can replace its result. There is no worksheet seed argument in the signature shown here. Exact GUI triggers, saved-file replay and cross-application transfer were not tested. Two calls do not promise the same underlying driver; repeated references to one random cell do not create independent observations.
The supplied driver values and mathematical summaries are deterministic teaching controls. They are not captured random samples. Ideal continuous distributions differ from a finite-resolution generator: rounding, underflow, overflow and endpoint treatment can matter. Non-finite arithmetic is converted to #NUM! by the numeric result constructor. Explicit finite numeric inputs are used throughout; text/blank coercion and locale-sensitive parsing are outside this verification.