# we roll a dice multiple times. Let X be a random variable for the number of rolls until the first 2 occurs. we can say that X is geometric distributed with density function f(k)...

we roll a dice multiple times. Let X be a random variable for the number of rolls until the first 2 occurs.

we can say that X is geometric distributed with density function f(k) = p(1-p)^k-1

where p = 1/6

and k **€ N**

a) calculate P(X<3)

b) calculate the probability that it takes more than 2 rolls to get the first 2.

*print*Print*list*Cite

Since `f(k)=p(1-p)^(k-1)` is probability density function of geometric random variable it follows that its cumulative distribution function is

`F(k)=sum_(i=1)^k f(i)=sum_(i=1)^k p(1-p)^(i-1)=p+p(1-p)+cdots+p(1-p)^(k-1)=`

`p(1+(1-p)+(1-p)^2+cdots+(1-p)^(k-1))=p((1-(1-p)^k)/(1-(1-p)))=`

`1-(1-p)^k`

**a)**

`P(X<3)=F(2)=1-(1-1/6)^2=1-25/36=11/36`

Alternatively you can calculate `P(X<3)` as follows:

`P(X<3)=P(X=1)+P(X=2)=1/6+1/6(1-1/6)=`

`1/6+1/6-1/36=(6+6-1)/(36)=11/36`

**b)**

Probability that it takes more than 2 rolls to get first 2 is `P(X geq 3)` which is opposite event to getting first 2 in less than 3 rolls. Hence ` `

`P(X geq 3)=1-P(X<3)=1-11/36=25/36`.

Alternatively you can calculate it by using cumulative probability distribution function:

`P(X geq 3)= F(infty)-F(2)=1-11/36=25/36`