Memra

Binomial cumulative probabilities and pbinom

◈ 5 cards

Add the pmf up to k; "at least" by the complement; and what dbinom and pbinom return — the "more than" trap.

Building the cumulative table

For the pmf values, from L6.4's formula:

01234
0.14220.30120.29240.17200.0683
0.14220.44350.73580.90780.9761

The second row is the running total — the cumulative probability. Any phrase from L6.1 is now one or two lookups:

  • At most 2 errors: .
  • At least 3: . Ten terms by the direct route; one subtraction by the complement.
  • More than 3: .
  • Between 1 and 3 inclusive: .

Every cumulative question reduces to which goes into and whether to subtract from 1. That is the whole skill.

What R prints

The paper may hand you R output instead of a table. Two functions matter:

> dbinom(2, 12, 0.15)
[1] 0.2923585
> pbinom(2, 12, 0.15)
[1] 0.7358181
> 1 - pbinom(2, 12, 0.15)
[1] 0.2641819

dbinom(x, n, p) is the pmf, — the d is for density, the name R uses for both kinds of variable. pbinom(k, n, p) is the cumulative less than or equal, always. So 1 - pbinom(2, …) is , and the three printed lines are the three hand values above at seven significant figures.

The trap

"More than 2" is not 1 - pbinom(2, …). That expression is — which is more than 2. The trap runs the other way: "at least 2" is = 1 - pbinom(1, …), not 1 - pbinom(2, …). Translate the phrase to an inequality, move the boundary so the right side is , then write the call:

PhraseInequalityR
at most pbinom(k, n, p)
fewer than pbinom(k - 1, n, p)
more than 1 - pbinom(k, n, p)
at least 1 - pbinom(k - 1, n, p)

R also accepts lower.tail = FALSE, which returns directly — the same as 1 - pbinom(k, …); you will meet it in Module 7 with pnorm.

Reading the seven digits

R prints 0.7358181 where the hand table says 0.7358. Both are right; the paper's tolerance (±0.0005 for a four-decimal pmf sum) accepts either. Never quote more decimals than the question's own inputs support.

xp(x)P(X ≤ x)00.14220.142210.30120.443520.29240.735830.17200.907840.06830.9761P(X ≥ 3) = 1 − 0.7358 = 0.2642 · P(X > 3) = 1 − 0.9078 = 0.0922.
The cumulative table for Bin(12, 0.15). P(X ≤ 2) = 0.7358 is what pbinom(2, 12, 0.15) returns; P(X ≥ 3) = 1 − 0.7358.
NORMAL ~/memra/learn/afm-113/binomial-cumulative-probabilities-and-pbinom utf-8 LF