1. 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
  1. 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?
p <- 0.5

(1 - p)^3
## [1] 0.125