Introduction to Probability, Grinstead, C. Snell, J.,
1997
Page 197
Question 7
Question
7) A die is rolled until the first time that a six turns up.(a)
What is the probability distribution for T?
Geometric distribution because:
1.) there are two outcomes, success and failure. In this case, success
is a six.
2.) each roll is independent, and
3.) the die is rolled until a success
p= probability of rolling a 6 = 1/6
k= number of rolls
\(P(T=k)=(1-p)^{k-1}*P\)
\(P(T=k)=(1-1/6)^{k-1}*1/6\)
\(P(T=k)=(5/6)^{k-1}*1/6\)
\(P(T=k)=(5/6)^{k-1}*1/6\)
b.)Find P(T > 3)
P(T>3)= 1 - P(T ≤ 3)
P(T≤3)= P(T=1)+P(T=2)+P(T=3)
P(T≤3)= \(((5/6)^{3-1}*1/6)\) + \(((5/6)^{2-1}*1/6)\) + \(((5/6)^{1-1}*1/6)\) =0.4211
P(T>3)= 1 - (0.1157+0.1388+0.1666)=0.5789
The probability that the first six is rolled after four or more rolls is 57.9%.
library(stats)
p_success=1/6
p_greater_than_3 <- 1- pgeom(2, prob = p_success) # i don't understand why this is a two and not a three
p_greater_than_3
## [1] 0.5787037
c.)Find P(T > 6|T > 3).
We know P(T>3) from Part b
P(T > 3)= 0.5787037
P(T>6)= 1-P(T≤6)
P(T≤6)= P(T=1)+P(T=2)+P(T=3)+P(T=4)+P(T=5)+P(T=6)
P(T≤6)= 0.6647
P(T>6)= 1- 0.6647= 0.3353
Using the conditional probability formular \[ P(A | B) = \frac{P(B)}{P(A \cap B)}
\]
0.3353/0.5787037= 0.5794
The probability that the first six is rolled after more than six rolls (given that there are more than three roles) is 57.9%. Trick question.
#p_greater_than_3 # P(T > 3)= 0.4822531
p_greater_than_6 <- 1- pgeom(5, prob = p_success)# i don't understand why this is a five and not a six
answer<-p_greater_than_6/p_greater_than_3
answer
## [1] 0.5787037