0
$\begingroup$

We throw a regular cube $20$ times and write the results in a row. we look at the row and count the number of $121$ sequences.

(For example: if we have $11626451214435612121$ then we get three $121$ sequences).

I want to compute the expected value of the number of sequences $121$

what I have tried is to define $I_i=\begin{cases} 1 & \text{121 sequence begin in the i place} \\ 0 & \text{otherwise} \end{cases}$

and the number of sequences will be $R(121)=\sum_{n=1}^{20}I_i$, so we get $E[R(121)]=\sum_{n=1}^{20}E[I_i]$

Can you help me to proceed or give me other way to solve this if I'm wrong?

$\endgroup$
3
  • $\begingroup$ Your approach of the problem is okay. Only note that the right expression is $\sum_{i=1}^{18} \mathbb E[I_i]$. Just finish the job by finding $\mathbb E[I_i]$ $\endgroup$
    – drhab
    Commented Jun 27, 2017 at 14:50
  • $\begingroup$ Note that $\mathbb E[I_i] = \mathbb E[I_1]$ for $1 \le i \le 18$ $\endgroup$
    – Henry
    Commented Jun 27, 2017 at 15:00
  • $\begingroup$ As an aside only loosely related to the question, I believe the expected number of throws until $121$ first appears is $6^3+6$, slightly more than $1/\mathbb E[I_1]$ $\endgroup$
    – Henry
    Commented Jun 27, 2017 at 15:11

1 Answer 1

0
$\begingroup$

$$E(R(121)) = \sum_{i=1}^{18}E(I_i)$$

$$E(I_i) = P(\text{121 sequence begins in $i$th place}) = \frac{1}{6^3}$$

Edit: As requested in the comment by @timi,

$$Var(R(121)) = \sum_{i=1}^{18}\sum_{j=1}^{18}Cov(I_i, I_j)$$

where

  • $Cov(I_i, I_i) = Var(I_i) = E(I_i^2) - E(I_i)^2$ in which $E(I_i^2) = \frac{1}{6^3}$.

  • $Cov(I_i, I_{i-1}) = E(I_iI_{i-1}) - E(I_i)E(I_{i-1})$ where $E(I_iI_{i-1}) = 0$ because $I_{i-1}=1 \wedge I_{i}=1$ is an impossible event.

  • $Cov(I_i, I_{i-2}) = E(I_iI_{i-2}) - E(I_i)E(I_{i-2})$ where $E(I_iI_{i-2}) = P(I_i=1|I_{i-2}=1)P(I_{i-2}=1) = \frac{1}{6^2}\frac{1}{6^3}$, that is for the case of $12121$.

  • and $Cov(I_{i}, I_{i-k}) = 0, \forall k \geq 3$.

$\endgroup$
5
  • $\begingroup$ Thanks, expiTTp1z0. $\endgroup$
    – timi
    Commented Jun 27, 2017 at 15:15
  • $\begingroup$ Just one more question. If I want to calculate the Var(the number of sequences 121). Is there any formulafor this? thanks. $\endgroup$
    – timi
    Commented Jun 27, 2017 at 15:20
  • $\begingroup$ Check the edited answer. $\endgroup$ Commented Jun 27, 2017 at 15:33
  • $\begingroup$ @timi let me know if you don't understand something. I wrote quickly. $\endgroup$ Commented Jun 27, 2017 at 15:39
  • $\begingroup$ understood! Thanks! $\endgroup$
    – timi
    Commented Jun 27, 2017 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .