Contact

PROB Function (OpenOffice Calc)

Statistical Intermediate OpenOffice Calc

Sum discrete probabilities with OpenOffice PROB, using native inclusive ranges, duplicate outcomes, reversed bounds and the release’s near-one sum tolerance.

Verification status: Eight reference formulas and 8 diagnostic cases were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using generated native ODF and GUI hard recalculation. Saved formula identities and typed results were checked; the load warning is described below. How formula examples are checked

Quick answer: =PROB(N2:N5;O2:O5;0;1) returned 0.1 in the tested Apache OpenOffice 4.1.16 build.

Availability and version history

  • Introduced: First release not established; documented by OpenOffice.org 3.3.
  • Supported in: Apache OpenOffice 4.1.16; this identifies a verified release, not a final supported version.
  • Scope: Desktop Calc, English function names and semicolon-separated formulas.
  • Checked: October 14, 2026. Eight reference formulas and the listed diagnostics were recalculated from generated native ODF in 4.1.16 on Linux x86-64, Build 9816. Source and independent reference calculations were also checked.

What PROB returns

PROB sums the supplied probability masses whose corresponding outcome values lie in an inclusive interval. When Upper is omitted, it returns the mass at Lower. Repeated outcome values are allowed; their matching probabilities are added. Release entry.

Syntax and arguments

=PROB(Values; Probabilities; Lower [; Upper])

Values and Probabilities must have the same matrix dimensions and numeric corresponding entries. Each probability must lie in [0,1], including zero. The implementation accepts a total probability within 10^−7 of one. Lower is required; Upper is optional. If Lower exceeds Upper, this release swaps them before selecting the inclusive interval.

Worksheet data

Enter these four rows in N, O, P and U. P provides a valid distribution with a zero probability; U supplies a repeated outcome.

Row N: outcome O: probability P: alternative U: repeated outcome
2 1 0.1 0 1
3 2 0.2 0.2 2
4 3 0.3 0.3 2
5 4 0.4 0.5 4

For the diagnostics, Q2:Q5 is −0.1, 0.3, 0.3, 0.5; R2:R5 is 0.1, 0.2, 0.3, 0.3; T2:T5 is 0.1, 0.2, 0.3, 0.40000005. S2:S5 is 1, the text word text, 3, 4.

Reproducible examples

The native column records the saved 4.1.16 results. The independent values use high-precision mathematics; displayed decimals are rounded to twelve places. The data setup above is required for range formulas.

Formula Native 4.1.16 result Independent reference
=PROB(N2:N5;O2:O5;2) 0.2 0.2
=PROB(N2:N5;O2:O5;2;3) 0.5 0.5
=PROB(N2:N5;O2:O5;1;4) 1 1
=PROB(N2:N5;O2:O5;0;1) 0.1 0.1
=PROB(N2:N5;O2:O5;5) 0 0
=PROB(N2:N5;O2:O5;3;2) 0.5 0.5
=PROB(U2:U5;O2:O5;2) 0.5 0.5
=PROB(N2:N5;P2:P5;1;2) 0.2 0.2

Practical worksheet

For a demand model with outcomes 1 through 4 and probabilities 0.1, 0.2, 0.3, 0.4, =PROB(N2:N5;O2:O5;2;3) returns 0.5. It adds the masses at outcomes 2 and 3. Omitting the upper bound asks only for outcome 2 and returns 0.2.

Keep one outcome and its probability on each row. Sorting the outcome column without its probability column changes the model even if the probabilities still sum to one. PROB does not validate that the numerical inputs accurately describe the underlying demand process.

Advanced interpretation and checks

For disjoint outcomes 1 through 4, the interval [1,2] has probability 0.3 and [3,4] has probability 0.7; their sum is 1. For overlapping inclusive intervals, subtract the shared outcome mass before adding. For example [1,2] plus [2,4] double-counts the mass 0.2 at outcome 2.

The repeated-outcome U range assigns 0.2 and 0.3 to two rows both labeled 2. PROB at 2 returns 0.5. This is useful when a model intentionally splits a category across records, but accidental duplicate rows can also inflate a category.

The sum tolerance is not a normalization operation. The tested T probabilities total 1.00000005, and the full-interval call returns exactly that value at the displayed precision, rather than clipping it to 1. Normalize and inspect a probability model deliberately when exact total-one semantics are required.

Boundaries and troubleshooting

Negative probability and total 0.9 produce #VALUE! in the listed cases; mismatched dimensions produce #N/A. Text among the outcomes produces Err:502. Reversed numeric bounds 3 and 2 return the same 0.5 as 2 and 3. A nonnumeric bound and missing or extra arguments have their own errors. Zero probability is accepted, as shown by the valid P distribution.

These additional formulas were recalculated from the same generated ODF input. Error displays are retained as errors, even when an ODS numeric attribute stores zero.

Formula Observed result or error
=PROB(N2:N5;Q2:Q5;1;4) #VALUE!
=PROB(N2:N5;R2:R5;1;4) #VALUE!
=PROB(N2:N5;T2:T5;1;4) 1.00000005
=PROB(N2:N5;O2:O4;1;4) #N/A
=PROB(S2:S5;O2:O5;1;4) Err:502
=PROB(N2:N5;O2:O5;"abc") #VALUE!
=PROB(N2:N5;O2:O5) Err:511
=PROB(N2:N5;O2:O5;1;4;5) Err:504

Official evidence and checking scope

The generated ODF input produced the informational load warning “Not all attributes could be read.” After it was acknowledged, the sheet was hard-recalculated and saved separately. Every formula identity, typed input, input label and tested result was reconciled. True empty cells were distinguished from text and logical values. This does not certify every style attribute. The separately prepared XLSX input was not executed. A deliberately stale SUM cache changed from 999999 to 3, and an uncached SUM returned 7 after hard recalculation. Native evidence covers the eight reference formulas and listed diagnostics only. Other explanatory compositions are independent mathematical checks; other releases, locales and extreme-value behavior were not established by this run.