# Application of double expectation theorem

A component in system and a backup unit both have mean lifetime $\mu$. if component fails then it is in ediately replaced by backup, and there is probability $p$ that backup works. Find the expected total lifetime of the system. Let $T$ be the total lifetime of the system, and X the indicator for backup success (X=1 if backup works, X=0 if not). Then ...

To find the expected total lifetime we know that T is a random variable that depends on another random variable p - double expectation theorem is appropriate.

EDIT:

$E[E(T|X)] = E(T|X=0)P(X=0)+E(T|X=1)P(X=1) = \mu (1-p) +$ 2$\mu p= (1+p)\mu$

Where does the highlighted 2$\mu$ come from ?

• It should be $2\mu p$. If $C$ is the random variable denoting the lifetime of the original component and $B$ denotes the lifetime of the backup component, then $T=C+BX$. Thus, $\mathbb{E}[T|X=1]\Pr[X=1]=\mathbb{E}[C+B]\cdot p=2\mu p$ since $\mathbb{E} C=\mathbb{E} T=\mu$. – munchhausen Jun 25 '18 at 7:48
• You are right, i missed the$p$ somehow. + thanks for the explanation of the expectation, now it makes sense to me – Nneka Jun 25 '18 at 7:57

let $T$ be the total lifetime of the system. This lifetime is the sum of two random variables, say $T = T_1 + T_2$, representing the individual random observed times to failure of the main component and the backup, respectively. However, the components have intrinsic random lifetimes of $L_1$ and $L_2$, which represent the lifetimes if the component were to operate. That is to say, $$T_1 \mid X = L_1,$$ and $$T_2 \mid X = \begin{cases}0, & X = 0 \\ L_2, & X = 1. \end{cases}$$ In this notation, $L_1$ and $L_2$ are iid with common mean $\mu$. However, $T_1$ and $T_2$ are not identically distributed.
Consequently, \begin{align*} \operatorname{E}[T] &= \operatorname{E}[\operatorname{E}[T \mid X]] \\ &= \operatorname{E}[\operatorname{E}[T_1 + T_2 \mid X]] \\ &= \operatorname{E}[T_1 + T_2 \mid X = 0]\Pr[X = 0] + \operatorname{E}[T_1 + T_2 \mid X = 1]\Pr[X = 1] \\ &= \operatorname{E}[L_1 + 0]\Pr[X = 0] + \operatorname{E}[L_1 + L_2]\Pr[X = 1] \\ &= \operatorname{E}[L_1](1-p) + (\operatorname{E}[L_1] + \operatorname{E}[L_2])p \\ &= \mu(1-p) + (\mu + \mu)p \\ &= (1+p)\mu. \end{align*}
Much of this formalism admits shortcuts if we write instead $$\operatorname{E}[T] = \operatorname{E}[\operatorname{E}[T \mid X]] = \operatorname{E}[\mu + \mu X] = \mu\operatorname{E}[1+X] = \mu(1+p).$$ Why does this work? Because the the mean lifetime of the backup is $\mu X$; i.e., $$\operatorname{E}[T_2 \mid X] = \mu X.$$