# pgeom in R does not seem to exhibit memorylessness as expected

The geometric and exponential distributions exhibit memorylessness, i.e., $$P(X \geq k + j)=P(X\geq k)P(X\geq j)$$

This can be shown for an arbitrary exponential distribution using R:

> pexp(q=1, rate=1, lower.tail = F)
[1] 0.3678794
> pexp(q=0.2, rate=1, lower.tail = F)*pexp(q=0.8, rate=1, lower.tail = F)
[1] 0.3678794


This same result should hold for the geometric distribution. However, when I perform a similar calculation using pgeom(), I do not get the same result

> pgeom(q=3, prob=0.2, lower.tail = F)
[1] 0.4096
> pgeom(q=1, prob=0.2, lower.tail = F)*pgeom(q=2, prob=0.2, lower.tail = F)
[1] 0.32768


Can someone help explain this discrepancy? Based on these examples, the geometric distribution as calculated by pgeom does not exhibit memorylessness.

• Welcome to CV. The memorylessness is for a r.v. $X$ taking values $1$, $2$, $\dots$ and representing the number of trials needed to reach the $1$-st success, while the geometric distribution in R is for the number $Y$ of failures before the first success, with values $0$, $1$, $\dots$. In distribution $X = Y +1$. In R pgeom(k, prob = p, lower.tail = FALSE) gives $P(Y > k) = (1 - p)^{k+1}$ for $k=0$, $1$, $\dots$.
– Yves
Oct 26, 2023 at 9:32
• If you adjust for the support, you will find for example pgeom(q=9-1,prob=0.2,lower.tail=F) and pgeom(q=3-1,prob=0.2,lower.tail=F) * pgeom(q=6-1,prob=0.2,lower.tail=F) give the same 0.2097152 and similarly for other examples Oct 27, 2023 at 0:48
• Ah, I understand. Thank you for the follow-up, Henry. My misunderstanding was a difference in convention. A similar explanation in doi.org/10.1002/9781119536963.ch10 in case helpful for others: "$X$ calculations in R correspond to our $X+1$ calculations above. For example, $X=0$ in R means zero failures before first success, which is equivalent to $X=1$, the first success occurs in the first trial, in our model." Also, in case others use the above commands, the probability is 0.1342177. Oct 27, 2023 at 3:53

The memorylessness is for a r.v. $$X$$ taking values $$1$$, $$2$$, $$\dots$$ and representing the number of trials needed to reach the $$1$$-st success in a sequence of independent Bernoulli trials, while the geometric distribution in R is for the number $$Y$$ of failures before the first success, with values $$0$$, $$1$$, $$\dots$$. In distribution $$X = Y +1$$. In R pgeom(k, prob = p, lower.tail = FALSE) gives $$P(Y > k) = (1 - p)^{k+1}$$ for $$k \geqslant 0$$.
• Thanks for the explanation. I wanted to clarify that dgeom in R does not have an argument lower.tail. Also, is there a way to express the property of memorylessness of the geometric distribution in R as I did with the pexp function? Oct 26, 2023 at 22:42