CUNY MSDS DATA 605 Week 7

Nicholas Schettini

October 10, 2018

  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(T, T) = (1-p)^2\]

\[P(T, T, T, T, T | T T) = \frac{P(T,T,T,T,T)}{P(T,T)} = (1-p)^3\]

p <- 0.5

(1 - p)^3
## [1] 0.125
  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
  1. Find P(T > 6|T > 3).
k <- 5

T6 <- pgeom(k, p, lower.tail = F)

T3 * T6 /T3
## [1] 0.334898