# Roll a die $n$ times ($n$ is a natural number). What is the probability that 1 and 6 are observed at least once?

Note: This is a homework problem so I cannot accept solutions. I would like suggestions as to how to proceed.

I have that each trial of rolling a die is independent. So I can say:

Let $P(1)$ = Rolling a 1 and $P(6)$ = Rolling a 6. We want to find $P(1\cap 6)$. Since rolling a die and getting an outcome in a trial is independent of other trials: $P(1\cap6)=P(1)P(6)$

It's unclear to me how to find the probability that you roll a 1 if you roll $n$ times. Would it be $P(1)=1/6^n$

• Hint: This is an inclusion-exclusion question... – Thomas Andrews Feb 11 '15 at 3:18
• Sometimes it is better to ask, what is the probability that I roll $n$ times and none of the rolls is $1$? That is, every roll comes up one of the other five numbers. – David K Feb 11 '15 at 3:57

The total number of combinations is $6^n$.

The number of combinations which include only $[2,3,4,5,6]$ is $5^n$.

The number of combinations which include only $[1,2,3,4,5]$ is $5^n$.

The number of combinations which include only $[2,3,4,5]$ is $4^n$.

So the probability of not observing $1$ and $6$ is therefore:

$$\frac{5^n+5^n-4^n}{6^n}$$

And the probability of observing $1$ and $6$ at least once is:

$$1-\frac{5^n+5^n-4^n}{6^n}$$

• Many thanks. The listing of the number combinations helped me a lot. The rest is, as Thomas Andrew and David K hinted, inclusion/exclusion. – Minh Tran Feb 12 '15 at 22:13
• @MinhTran: You're welcome :) – barak manos Feb 13 '15 at 8:10

Let $t_{ab}(n)$ be the number of sequences of length $n$ containing $a$ and $b$ (assuming $a \ne b$).

Let $t_{a}(n)$ be the number of sequences of length $n$ containing $a$.

Let $t(n)$ be the number of sequences of length $n$.

The question is to investigate $t_{16}(n)$. Each sequence starts with a $1$, $6$, or something else, so:

$$t_{16}(n) = t_{1}(n - 1) + t_{6}(n - 1) + 4 ~ t_{16}(n-1) \tag{A}$$

Similarly, $t_{a}(n)$ either starts with $a$ or it doesn't:

$$t_{a}(n) = t(n-1) + 5 ~ t_{a}(n - 1) \tag{B}$$

Finally,

$$t(n) = 6^n \tag{C}$$

(C) is solved, so (B) becomes:

$$t_{a}(n) = 6^{n-1} + 5 ~ t_{a}(n - 1) \tag{B2}$$

A recursive equation which can be solved:

\begin{align} % -1~t_{a}(n) + 5~t_{a}(n-1) &= 6^{n-1} \\ % -1~t_{a}(n + 1) + 5~t_{a}(n) &= 6\cdot 6^{n-1} \\ % t_{a}(n + 1) &= 11~t_{a}(n) - 30~t_{a}(n-1) \\ % \end{align}

Which is a linear recursive equation, and it solves to

$$t_{a}(n) = 6^n - 5^n \tag{B3}$$

So (A) becomes

$$t_{16}(n) = 2\left(6^{n-1} - 5^{n-1}\right) + 4 ~ t_{16}(n-1) \tag{A2}$$

Solving similarly:

\begin{align} % t_{16}(n) - 4 ~ t_{16}(n-1) &= 2~6^{n-1} - 2~5^{n-1} \\ % t_{16}(n+1) - 4 ~ t_{16}(n) &= 12~6^{n-1} - 10~5^{n-1} \\ % t_{16}(n+2) - 4 ~ t_{16}(n+1) &= 72~6^{n-1} - 50~5^{n-1} \\ \end{align}

Eliminating the exponents between the 3 equations, it yields:

$$t_{16}(n+2) = 15~t_{16}(n+1) - 74~t_{16}(n) + 120~t_{16}(n-1)$$

Another linear recursive equation, which solves to:

$$t_{16}(n) = 6^{n} - 2\cdot 5^{n} + 4^{n} \tag{A3}$$

And the resulting probability is then:

$$\boxed{\huge{\frac{6^{n} - 2\cdot 5^{n} + 4^{n}}{6^n}}}$$