1

If it is a good day (G) there are 60% chances tomorrow will be G and 40% chances tomorrow will be bad (B). If it is a B day, there 30% chances tomorrow will be G and 70% chances tomorrow will be B. If today is B, what is the expected number of days before seeing another B?

What I think is right: $E(days)=0.7(1)+0.12(2)+0.072(3)+...$

Is this the right way? If it is, how would I sum this? If not, please let me know.

aristotlesdad
  • 41
  • 1
  • 5

3 Answers3

1

Whenever we have a bad day, we count that day and stop otherwise with probability $p$ we continue to the next day. As today is a bad day, for tomorrow $p = 0.3$ of having a good day. There on if we have a good day, probability of another good day is $0.6$.

$E(X) = 1 + 0.3 \times (1 + 0.6 \times (1 + 0.6 \times(1 + ...) + ..._)$

$E(X) = 1 + 0.3 \times \frac{1}{1-0.6} = 1.75$ (using sum of infinite geometric series $ = \frac{a}{1-r} \, ,a = 1, r = 0.6)$.

If the day when the next bad day happens should not be counted in, subtract $1$.

Math Lover
  • 51,819
1

Is this the right way? : E(days)=0.7(1)+0.12(2)+0.072(3)+...

Yes, it is!

In other words, the sequence, expressed in days, is the following

$1 \xrightarrow{\text{with probability}} p=0.7$

$2\xrightarrow{\text{with probability}} p=0.3\times0.4$

$3\xrightarrow{\text{with probability}} p=0.3\times0.6\times0.4$

$4\xrightarrow{\text{with probability}} p=0.3\times0.6\times0.6\times0.4$

$5\xrightarrow{\text{with probability}} p=0.3\times0.6\times0.6\times0.6\times0.4$

...

$n \xrightarrow{\text{with probability}} p=0.3\times0.4\times\underbrace{0.6\times0.6\times\dots\times0.6}_{\text{(n-2) times}}$

Thus the expectation is the following

$$ \bbox[5px,border:2px solid red] { \mathbb{E}[X]=0.7+0.3\mathbb{E}[Y]=0.7+0.3\Bigg[1+\frac{1}{0.4}\Bigg]=1.75 \qquad (1) } $$

Where $Y$ is a geometric distribution with success parameter $0.4$ and starting from $k=2$


In any case, you can solve the series in an analytical way:

Setting $0.6=p$ your series becomes

$$\mathbb{E}[X]=0.7+\frac{0.3\times0.4}{0.6}\underbrace{\sum_{x=2}^{\infty}x p^{x-1}}_{=S}$$

$$S=\sum_{x=2}^{\infty}\frac{d}{dp}p^x=\frac{d}{dp}\sum_{x=2}^{\infty}p^x=\frac{d}{dp}\frac{p^2}{1-p}=\frac{p(2-p)}{(1-p)^2}\Bigg]_{p=0.6}=5.25$$

Thus

$$\mathbb{E}[X]=0.7+\frac{0.3\times0.4}{0.6}\times 5.25=1.75$$

As alreay obtained in (1).

tommik
  • 32,733
  • 4
  • 15
  • 34
1

If you read well my previous answer I wrote:

In other words, the sequence, expressed in days, is the following

$1 \xrightarrow{\text{with probability}} p=0.7$

$2\xrightarrow{\text{with probability}} p=0.3\times0.4$

$3\xrightarrow{\text{with probability}} p=0.3\times0.6\times0.4$

$4\xrightarrow{\text{with probability}} p=0.3\times0.6\times0.6\times0.4$

$5\xrightarrow{\text{with probability}} p=0.3\times0.6\times0.6\times0.6\times0.4$

...

$E(X)=0.7+0.3[2\times0.4+3\times0.4\times0.6+4\times0.4\times0.6^2+5\times0.4\times0.6^3+\dots]$

The probabilities in the [ brackets are the one of a geometric: $p(1-p)^x$ where $p=0.4$ and $(1-p)=0.6$

Is it clear now?

If the support was correctly $Y=1,2,3,4,...$ the average would have been $\frac{1}{0.4}$. Given that the support is $2,3,4,...$ instead... you can think that your rv is

$$Z=Y+1$$

Thus for linearity of the mean you can have

$$E(Z)=1+E(Y)$$

tommik
  • 32,733
  • 4
  • 15
  • 34