7 A die is rolled until the first time T that a six turns
up. (a) What is the probability distribution for
T? (b) Find P(T > 3). (c) Find P(T
> 6|T > 3).
The probability distribution for T follows a geometric distribution, represented by the formula:
\[ P(T = k) = (1 - p)^{k-1} \times p \]
prob_success <- 1/6
# (b) Probability that T > 3
prob_T_gt_3 <- 1 - pgeom(3, prob = prob_success)
# (c) Probability that T > 6 given T > 3
prob_T_gt_6_given_T_gt_3 <- (1 - pgeom(6, prob = prob_success)) / (1 - prob_T_gt_3)
print(prob_T_gt_3)
## [1] 0.4822531
print(prob_T_gt_6_given_T_gt_3)
## [1] 0.539031