Word probability problem about conditional expectation A spam filter checks each incoming message to be classified as either spam or non-spam, and only messages classified as non-spam are to be delivered to each inbox. On average, however, one percent of messages are incorrectly classified. When 95 percent of incoming messages are spam and this filter is applied, what is the percentage of spam in each inbox?  
 A: The problem presented could be quickly solved using a 2-way table or a tree diagram.
Here I present a solution based on a 2-way table. Let's denote


*

*$S$ - spam, $\bar S$ - no spam

*$C$ - correctly classified, $\bar C$ - not correctly classified


$$\begin{array}{l|c|c|r}
 & C & \bar C &  \\
\hline
S & \color{red}{0.99 \cdot 0.95} & \color{green}{0.01 \cdot 0.95} & 0.95 \\
\hline
\bar S & \color{green}{0.99 \cdot 0.05} & \color{red}{0.01 \cdot 0.05} & 0.05 \\
\hline
 & 0.99 & 0.01 & 1
\end{array}$$


*

*the fraction of mail $\color{red}{\mbox{not passed}}$ to the inbox is highlighted in $\color{red}{\mbox{red}}$

*the fraction of spam passed to the mail box: $\color{green}{0.01 \cdot 0.95}$

*the fraction of mail, that is passed to the inbox: $\color{green}{0.01 \cdot 0.95} + \color{green}{0.99 \cdot 0.05}$


So, the percentage of spam in the inbox is
$$\frac{\color{green}{0.01 \cdot 0.95}}{\color{green}{0.01 \cdot 0.95} + \color{green}{0.99 \cdot 0.05}} \approx \boxed{16.1 \%}$$
A: Say a inbox recieves $x$ message before filtering.  You are told that is $0.95x$ spam and $0.05x$ nonspam.
$1\%$ of spam is incorrectly passed, and $99\%$ of nonspam is correctly passed.  So what amount is this?  
Go forth and multiply. Sum to get the total amount passed by the filter.  Divide and calculate.
