The chance your first win comes within q misses or fewer.
pgeom(q, prob, lower.tail = TRUE)
Key idea
Gives the cumulative (running-total) chance of winning within q misses, written P(X <= q). (e.g. pgeom(1, 0.5) = 0.75)
It adds up dgeom for miss counts from 0 through q. (e.g. P(0)+P(1))
Use it for 'will it succeed within a few tries' questions. (e.g. win by 2nd flip)
It equals 1 minus (1 minus p) raised to the (q + 1) power. (e.g. 1 - 0.5^2 = 0.75)
As q grows the probability climbs toward 1 (near-certain). (e.g. pgeom(9,0.5) = 0.999)
Definition
F(q)=P(X≤q)=1−(1−p)q+1
q
misses counted up to
p
chance of success each try
F(q)
chance the first win comes by then
In plain words
Hoping for a six soon? pgeom tells you the chance you get it within the first few rolls.
Where you'd use it
A six has chance 1/6 per roll. The chance your first six arrives within 3 rolls means 2 misses or fewer, pgeom(2, 1/6) ≈ 42%.
A salesperson closes 20% of calls. The chance a sale comes within the first 5 calls (4 misses or fewer) is pgeom(4, 0.2) ≈ 67%, so it is more likely than not by the fifth call.
Flipping a fair coin (prob = 0.5), the chance of getting heads within 3 flips (2 misses or fewer) is pgeom(2, 0.5) = 0.875, climbing toward certainty the more flips you allow.
Worked example 7
A fair coin (prob = 0.5). The chance of your first heads within 2 misses or fewer is 0.875.
Frequently asked questions
What does pgeom give?
P(X ≤ k) failures before the first success — mind the 0-based count.