A die is rolled until the first time T that a six turns up.
Find P(T > 3).
p <- 1/6
k <- 2
T3 <- pgeom(k, p, lower.tail = F)
T3
## [1] 0.5787037
Find P(T > 6|T > 3).
k <- 5
T6 <- pgeom(k, p, lower.tail = F)
T3 * T6 /T3
## [1] 0.334898
If a coin is tossed a sequence of times, what is the probability that the first head will occur after the fifth toss, given that it has not occurred in the first two tosses?