R.DBINOM Function (Gnumeric)
Find exact binomial-count probabilities with Gnumeric R.DBINOM. Compare integer checks, zero-trial cases, direct log mass and the cumulative alternative.
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.DBINOM(2,5,.5) gives 0.3125 in Gnumeric 1.12.57.
Availability and version history
- Introduced: First release not established; named in Gnumeric 1.12.10 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.DBINOM returns
R.DBINOM returns the probability mass P(X=k) for a binomial count. Although the built-in help calls it a density, the integer-count result is a point probability. It does not accumulate all counts up to k. Versioned function help.
Syntax and arguments
=R.DBINOM(successes,trials,success_probability[,give_log])
- successes: count at which to evaluate the mass; normally an integer.
- trials: nonnegative integer number of independent trials.
- success_probability: common per-trial probability from 0 through 1.
- give_log: optional FALSE; TRUE returns the natural logarithm of the density or probability mass.
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; source guards explain the boundary cases. 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.DBINOM(2,5,.5) |
0.3125 |
=R.DBINOM(0,5,.2) |
0.32768 |
=R.DBINOM(5,5,.2) |
0.00032 |
=R.DBINOM(4,10,.4) |
0.250822656 |
=R.DBINOM(0,0,.5) |
1 |
=R.DBINOM(0,5,0) |
1 |
=R.DBINOM(5,5,1) |
1 |
=R.DBINOM(2,5,.5,TRUE()) |
-1.163150809806 |
Practical worksheet
For five independent trials with success probability 0.5, exactly two successes has probability 0.3125, from COMBIN(5,2)0.5^20.5^3. With ten trials and success probability 0.4, exactly four successes gives 0.250822656.
The trial model assumes a fixed number of trials with the same success probability. A count observed in a changing or dependent process does not become binomial merely because the arguments can be entered.
Advanced interpretation and checks
A mass can be recovered as the difference between neighboring cumulative values: P(X=2)=P(X≤2)−P(X≤1). The saved advanced check verifies that difference against R.DBINOM for n=5 and p=0.5.
At p=0 all probability is at zero; at p=1 it is at n. Zero trials therefore put all probability at zero as well. Direct log mode returns LN(mass), for example −1.163150809806 for mass 0.3125, and is useful when summing log likelihoods from an explicitly specified independent model.
The saved advanced-check result for =R.DBINOM(2,5,.5)-(R.PBINOM(2,5,.5)-R.PBINOM(1,5,.5)) was 0.
Boundaries and troubleshooting
A genuinely fractional count such as 2.9 returns zero mass, not the mass at floor(2.9). A fractional trial count such as 5.9 is an invalid model and gives #NUM!. The source allows a relative near-integer tolerance before rounding: the tested counts 2.000000000000001 and trials 5.000000000000001 are accepted. This is numerical tolerance, not permission to use fractional trials.
Counts below zero or above n have zero mass. Log zero becomes #NUM!; probabilities outside [0,1] and negative trials also error. Numeric text is converted, nonnumeric text is #VALUE!, and empty F5 acts as zero.
F5 is genuinely empty, rather than a cell containing an empty string.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=R.DBINOM(2.9,5,.5) |
0 |
=R.DBINOM(-1,5,.5) |
0 |
=R.DBINOM(6,5,.5) |
0 |
=R.DBINOM(2,5.9,.5) |
#NUM! |
=R.DBINOM(2,-1,.5) |
#NUM! |
=R.DBINOM(2,5,-.1) |
#NUM! |
=R.DBINOM(2,5,1.1) |
#NUM! |
=R.DBINOM(0,5,1) |
0 |
=R.DBINOM(0,5,1,TRUE()) |
#NUM! |
=R.DBINOM(2.000000000000001,5,.5) |
0.3125 |
=R.DBINOM(2,5.000000000000001,.5) |
0.3125 |
=R.DBINOM("2",5,.5) |
0.3125 |
=R.DBINOM("abc",5,.5) |
#VALUE! |
=R.DBINOM(F5,5,.5) |
0.03125 |
=R.DBINOM(2,5) |
#N/A |
=R.DBINOM(2,5,.5,0,1) |
#N/A |
Official evidence and checking scope
- Current worksheet callback
- Tested-version worksheet callback
- Current dbinom calculation
- Tested-version dbinom calculation
- Nonfinite worksheet-value handling
- Statistical Functions From R plugin declaration
- Near-integer tolerance
- Noninteger mass check
The deliberate fractional count/trial probes also emitted noninteger-input calculation warnings. The saved logs retain them.
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 preserves the R.* identities. The secondary ODF export keeps these calls in the ORG.GNUMERIC namespace; it does not establish execution in another product. GUI entry, other locales and other spreadsheet products were not tested.