Expected Value: Use Indicator variables and random variables

discrete mathematicsexpected valueprobability theoryrandom variables

Question:

Every time a customer orders a drink, the waiter serves the wrong drink with probability $\frac{1}{12}$, independently of other orders.

You order $7$ ciders, one cider at a time. Let $(D_1,D_2,…,D_7)$ be the sequence of drinks that the waiter serves. Define the following random variable $X$:

$X$ = the number of indices i such that $D_i$ is a cider and $D_{i+1}$ is not a cider.

What is the expected value $E(X)$ of $X$

Answer: 0.45833333

Attempt:
I start off labelling my indicator variable:
$$
X = \left\{\begin{array}{rc} 1,&\text{the number of indices i such that $D_i$ is a cider and $D_{i+1}$ is not a cider}{} \\ 0,&\text{any other cases}{}\end{array}\right.
$$

I need to find $P(X=1)$ but I'm not sure how to go about it. Will I be served 4 ciders and 3 non-cider drinks according to the condition? How do I incorporate the probability of the waiter getting the drink wrong?

I am struggling to proceed with these questions after defining the indicator variables. Any step by step guide would be appreciated.

Best Answer

Let $X_i$ be indicator variable for $i$-th event, so $X=X_1+...+X_7$. Then , for $i\leq 6$ we have $$E(X_i)=P(X_i=1) = {11\over 12}\cdot {1\over 12} $$ and $$E(X_7)= P(X_7 = 1)= {11\over 12}\cdot 0 = 0$$

so $$E(X) = E(X_1)+E(X_2)+...+E(X_7) =6\cdot {1\over 12}\cdot {11\over 12} = {11\over 24} $$