Contact

R.DBETA Function (Gnumeric)

Statistical Intermediate Gnumeric

Use R.DBETA in Gnumeric for beta density and log-density. Check both shape parameters, endpoint behavior and verified numerical examples.

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

Quick answer: =R.DBETA(.5,2,2) gives 1.5 in Gnumeric 1.12.57.

Availability and version history

  • Introduced: First release not established; present in the retained 1.12.57 source.
  • 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.DBETA returns

R.DBETA returns the density of a beta distribution on [0,1]. Both alpha and beta are shape parameters. The generated help calls the second parameter a scale, but the implementation uses the two-shape beta density; it does not rescale the interval. A density may exceed 1 and is not the probability of one exact observation. Versioned function help.

Syntax and arguments

=R.DBETA(x,alpha,beta[,give_log])
  • x: the observation on the unit interval; outside-support values have zero ordinary density.
  • alpha, beta: required positive shape parameters for the continuous distribution.
  • give_log: optional; FALSE by default, TRUE returns the natural logarithm of the density.

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

Reproducible examples

These self-contained formulas were recalculated natively. Ordinary-domain results were checked against independent mathematics; invalid-model observations are identified separately below. Results are rounded to twelve decimal places, or thirteen significant digits for small nonzero values. This is presentation precision, not a universal accuracy guarantee.

Formula Gnumeric 1.12.57 result
=R.DBETA(.5,2,2) 1.5
=R.DBETA(.4,1,4) 0.864
=R.DBETA(.25,2,3) 1.6875
=R.DBETA(.75,2,3) 0.5625
=R.DBETA(.5,1,1) 1
=R.DBETA(0,1,2) 2
=R.DBETA(1,2,1) 2
=R.DBETA(.5,2,2,TRUE()) 0.405465108108

Practical worksheet

For a symmetric beta model with alpha=beta=2, =R.DBETA(0.5,2,2) gives 1.5. That is a density height, not a 150% probability. With alpha=2 and beta=3, the density is 1.6875 at x=0.25 and 0.5625 at x=0.75, illustrating the model’s asymmetry.

For 0<x<1 the density is x^(alpha-1)*(1-x)^(beta-1)/B(alpha,beta). Use cumulative probabilities, rather than adding density heights, to calculate a probability over an interval.

Advanced interpretation and checks

Changing x to 1−x and exchanging the two shape parameters preserves density. The advanced check compares x=0.25 with shapes 2,3 against x=0.75 with shapes 3,2.

For positive density, the log form can be written (alpha-1)*LN(x)+(beta-1)*LN(1-x)-LN(B(alpha,beta)). The direct log option avoids needing to take the logarithm of a separately rounded or underflowed density. At the midpoint of Beta(2,2), the log-density is approximately 0.405465108108.

The saved advanced-check result for =R.DBETA(.25,2,3)-R.DBETA(.75,3,2) was 0.

Boundaries and troubleshooting

Endpoint behavior depends on the corresponding shape: at x=0, alpha=1 gives density beta, alpha>1 gives zero, and 0<alpha<1 gives an infinite mathematical density, displayed as #NUM!. The roles reverse at x=1. Logarithms of zero also become #NUM!.

The implementation permits some zero-shape limiting branches; the two interior zero-shape examples return 0. Those are not ordinary continuous beta models. Validate alpha>0 and beta>0 instead of interpreting every non-error result as a valid density. Numeric text was converted; nonnumeric text and incorrect argument counts produced the errors shown.

F5 is genuinely empty, rather than a cell containing an empty string. #NUM! can represent an unrepresentable infinite mathematical endpoint as well as an invalid numeric domain; the distinctions above matter.

Formula Gnumeric 1.12.57 result
=R.DBETA(-.1,2,2) 0
=R.DBETA(1.1,2,2) 0
=R.DBETA(0,.5,2) #NUM!
=R.DBETA(0,2,2) 0
=R.DBETA(1,2,.5) #NUM!
=R.DBETA(1,2,2) 0
=R.DBETA(.5,0,2) 0
=R.DBETA(.5,2,0) 0
=R.DBETA(.5,-1,2) #NUM!
=R.DBETA(.5,2,-1) #NUM!
=R.DBETA(".5",2,2) 1.5
=R.DBETA("abc",2,2) #VALUE!
=R.DBETA(F5,2,2) 0
=R.DBETA(.5,2) #N/A
=R.DBETA(.5,2,2,0,1) #N/A
=R.DBETA(-.1,2,2,TRUE()) #NUM!

Official evidence and checking scope

The relevant complete worksheet callback and main calculation helper are unchanged between the inspected versions. That does not establish later-version numerical execution. Both stale and uncached SUM controls recalculated correctly. Native XML identities were checked; secondary ODF exports retain these functions with the ORG.GNUMERIC namespace. GUI entry, other locales and other spreadsheet products were not tested.