2

Another task from former tests of my basic course on probability...

Each time a cup of coffee is requested, a coffee express:

  • Brews coffee with probability $p_c=0.9$;
  • Pours hot water to the cup with probability $p_w=0.09$;
  • Gets out of order and refuses this and any subsequent requests with probability $p_f=0.01$.

Let $X$ denote the amount of coffees the express prepares before it gets out of order. Compute $\operatorname{E}X$.

My solution attempt:

On $k$th request, assuming the express is not broken, let $c_k$ denote the event that it prepares coffee, $w_k$ mean that it prepares boiling water and $f_k$ mean that it fails. We have $\operatorname{P}(c_k|\neg f_k)=\frac{\operatorname{P}(c_k\wedge\neg f_k)}{\operatorname{P}(\neg f_k)}=\frac{p_c}{1-p_f}$

Let $F=k$ mean that the express went out of order while handling the $k$th request. Now by the law of total expectation we have:

$\operatorname{E}X=\sum^{+\infty}_{k=1}\operatorname{P}(F=k)\operatorname{E}(X|F=k)$

$F$ has geometric distribution, so we have $\operatorname{P}(F=k)=(1-p_f)^{k-1}p_f$

$X|F=f$ has binomial distribution with $k-1$ experiments, each having probability of success equal to $\operatorname{P}(c_k|\neg f_k)=\frac{p_c}{1-p_f}$; thus $\operatorname{E}(X|F=k)=(k-1)\frac{p_c}{1-p_f}$

Therefore:

$\operatorname{E}X=\sum^{+\infty}_{k=1}\operatorname{P}(F=k)\operatorname{E}(X|F=k)=\sum^{+\infty}_{k=1}(1-p_f)^{k-1}p_f(k-1)\frac{p_c}{1-p_f}=\\p_cp_f\sum_{k=1}^{+\infty}(1-p_f)^{k-2}(k-1)=p_cp_f\sum_{k=1}^{+\infty}(1-p_f)^{k-1}k$

Here is were I'm stuck. How to compute this sum? I've really forgotten much from discrete mathematics :(

gaazkam
  • 903
  • An alternative approach: let $Y$ be the number of cups of hot water dispensed before the machine gets out of order. Then $X+Y$ has a geometric distribution, $E(X+Y)=0.99/0.01=99,$ by linearity $E(X+Y)=EX+EY,$ and by symmetry $EX=10EY.$ Solve for $EX.$ – David K Jan 28 '18 at 20:41

1 Answers1

4

$$\sum_{n\geq0} x^n=\frac{1}{1-x}$$ By differentiating it with respect to $x$: $$\sum_{n\geq1}nx^{n-1}=\frac{1}{(1-x)^2}$$ Note: Both of the series' radius of convergence is $1$.

Botond
  • 11,938