R.PBETA Function (Gnumeric)
Calculate beta cumulative and upper-tail probabilities with Gnumeric R.PBETA. See log probabilities and the tested nonpositive-shape validation limitation.
Verification status: 23 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
Validate both shapes before calculation. Gnumeric 1.12.57 returned plausible-looking probabilities for the tested zero and negative shape inputs. These are invalid continuous beta-model inputs; a numeric result does not validate them.
Quick answer: =R.PBETA(.5,2,2) gives 0.5 in Gnumeric 1.12.57.
Availability and version history
- Introduced: First release not established; named in Gnumeric 1.5.2 release notes.
- 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.PBETA returns
R.PBETA returns the beta cumulative probability P(X≤x), or the upper-tail probability P(X>x) when lower_tail is FALSE. For a continuous model, both shapes must be positive. The help’s second “scale” label is misleading: beta is a second shape, and the support remains [0,1]. Versioned function help.
Syntax and arguments
=R.PBETA(x,alpha,beta[,lower_tail[,log_p]])
- x: cutoff on the unit interval; valid shapes give cumulative 0 below support and 1 above it.
- alpha, beta: required positive shapes.
- lower_tail: optional, defaults to TRUE; FALSE requests the upper tail.
- log_p: optional, defaults to FALSE; TRUE returns the natural logarithm of the selected probability.
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.PBETA(.5,2,2) |
0.5 |
=R.PBETA(.4,1,4) |
0.8704 |
=R.PBETA(.25,2,3) |
0.26171875 |
=R.PBETA(.75,2,3) |
0.94921875 |
=R.PBETA(.5,2,2,FALSE()) |
0.5 |
=R.PBETA(.4,1,4,FALSE()) |
0.1296 |
=R.PBETA(.5,2,2,TRUE(),TRUE()) |
-0.69314718056 |
=R.PBETA(.4,1,4,FALSE(),TRUE()) |
-2.043302495064 |
Practical worksheet
For alpha=1, beta=4 and x=0.4, =R.PBETA(0.4,1,4) gives 0.8704. The upper tail is 0.1296, obtained with FALSE as the fourth argument. These are complementary events under the same model.
With shapes 2,3, the probabilities at x=0.25 and x=0.75 are 0.26171875 and 0.94921875. Their difference, 0.6875, is the probability between those cutoffs. No density approximation is needed.
Advanced interpretation and checks
The beta CDF is the regularized integral of t^(alpha-1)*(1-t)^(beta-1) from 0 to x. For Beta(1,4), the upper tail simplifies to (1-x)^4; at x=0.4 it is 0.6^4=0.1296. Its natural logarithm is approximately −2.043302495064.
Request a small upper tail directly rather than subtracting a probability near 1. The advanced check adds the two directly calculated tails for the same cutoff and parameters.
The saved advanced-check result for =R.PBETA(.4,1,4)+R.PBETA(.4,1,4,FALSE()) was 1.
Boundaries and troubleshooting
The nonpositive-shape rows are observed invalid-input behavior, not mathematical beta probabilities. In particular, the tested inputs (x,alpha,beta)=(0.5,0,2) and (0.5,−1,2) returned approximately 0.305555555556 and 0.5859375. The inspected helper lacks a positive-shape guard. Check both shapes explicitly before using any result.
For valid shapes, a zero selected probability has logarithm −∞ and appears as #NUM!; the ordinary probability remains 0. A genuinely empty cutoff cell is converted to zero. These endpoint and conversion effects are different from the shape-validation defect.
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.PBETA(-.1,2,2) |
0 |
=R.PBETA(1.1,2,2) |
1 |
=R.PBETA(0,2,2) |
0 |
=R.PBETA(1,2,2) |
1 |
=R.PBETA(.5,0,2) |
0.305555555556 |
=R.PBETA(.5,2,0) |
0.694444444444 |
=R.PBETA(.5,-1,2) |
0.5859375 |
=R.PBETA(.5,2,-1) |
0.4140625 |
=R.PBETA(0,2,2,TRUE(),TRUE()) |
#NUM! |
=R.PBETA(1,2,2,FALSE(),TRUE()) |
#NUM! |
=R.PBETA("abc",2,2) |
#VALUE! |
=R.PBETA(F5,2,2) |
0 |
=R.PBETA(.5,2) |
#N/A |
=R.PBETA(.5,2,2,1,0,1) |
#N/A |
Official evidence and checking scope
- Current worksheet callback
- Tested-version worksheet callback
- Current pbeta calculation
- Tested-version pbeta calculation
- Nonfinite worksheet-value handling
- Statistical Functions From R plugin declaration
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.