\documentclass[a4paper,12pt]{article}
\setlength{\textwidth}{6.5in} \setlength{\textheight}{9in}
\setlength{\topmargin}{-.25in} \setlength{\oddsidemargin}{-.25in}
\newcommand\ds{\displaystyle}
\begin{document}

\parindent=0pt

QUESTION

A company manufactures batches of electrical components, with each
batch containing 10 components.  Past experience shows that 80\%
of batches contain one defective component and 20\% of batches
contain five defective components. The following options are
available for each batch.
\begin{description}
\item[(i)] Send the batch to the next stage of production
without inspection of components.
\item[(ii)] Reprocess the batch at a cost of \pounds1000 and
then send it to the next stage of production.  A reprocessed batch
contains one defective component.
\item[(iii)] Test two components from the batch at a cost of
\pounds 150.  Use the evidence of the test, either to send the
batch immediately to the next stage of production, or to reprocess
the batch first and then send it.
\end{description}
Each defective component which is sent to the next stage of
production costs \pounds500.  Which option would you recommend?

Suggest how the cost might be reduced by following an alternative
policy.

\bigskip

ANSWER


Let G denote a good batch (1 defective component) and B a bad
batch (5 defective components. Then $P(G)=0.8$ and $P(B)=0.2$.

Let $T_0,\ T_1$ and $T_2$ be the outcomes of the test.

\begin{eqnarray*}
P(T_0|G)&=&\frac{\left(\begin{array}{c}9\\2\end{array}\right)}{\left(\begin{array}{c}10\\2\end{array}\right)}=0.8\\
P(T_0|B)&=&\frac{\left(\begin{array}{c}5\\2\end{array}\right)}{\left(\begin{array}{c}10\\2\end{array}\right)}=\frac{2}{9}\\
P(T_1|G)&=&\frac{\left(\begin{array}{c}9\\1\end{array}\right)\left(\begin{array}{c}1\\1\end{array}\right)}{\left(\begin{array}{c}10\\2\end{array}\right)}=0.2\\
P(T_1|B)&=&\frac{\left(\begin{array}{c}5\\1\end{array}\right)\left(\begin{array}{c}5\\1\end{array}\right)}{\left(\begin{array}{c}10\\2\end{array}\right)}=\frac{5}{9}\\
P(T_2|G)&=&0\\
P(T_2|B)&=&\frac{\left(\begin{array}{c}5\\2\end{array}\right)}{\left(\begin{array}{c}10\\2\end{array}\right)}=\frac{2}{9}\\
\end{eqnarray*}

\begin{eqnarray*}
P(T_0)&=&P(T_0|G)P(G)+P(T_0|B)P(B)=\frac{154}{225}\\
P(T_1)&=&P(T_1|G)P(G)+P(T_1|B)P(B)=\frac{61}{225}\\
P(T_2)&=&P(T_2|G)P(G)+P(T_2|B)P(B)=\frac{10}{225}
\end{eqnarray*}

\begin{eqnarray*}
P(G|T_0)=\frac{P(G\cap
T_0)}{P(T_0)}=\frac{P(T_0|G)P(G)}{P(T_0)}=\frac{72}{77}\\
P(B|T_0)=\frac{P(B\cap
T_0)}{P(T_0)}=\frac{P(T_0|B)P(B)}{P(T_0)}=\frac{5}{77}\\
P(G|T_1)=\frac{P(G\cap
T_1)}{P(T_1)}=\frac{P(T_1|G)P(G)}{P(T_1)}=\frac{36}{61}\\
P(B|T_1)=\frac{P(B\cap
T_1)}{P(T_1)}=\frac{P(T_1|B)P(B)}{P(T_1)}=\frac{25}{61}\\
P(G|T_2)=\frac{P(G\cap
T_2)}{P(T_2)}=\frac{P(T_2|G)P(G)}{P(T_2)}=0\\
P(B|T_2)=\frac{P(B\cap
T_2)}{P(T_2)}=\frac{P(T_2|B)P(B)}{P(T_2)}=1\\
\end{eqnarray*}


G is a good batch (1 defective component)

B is a bad batch (5 defective components)

$T_0$ the test yields 0 defective components

$T_1$ the test yields 1 defective component

$t_2$ the test yields 2 defective components

\setlength{\unitlength}{.5in}
\begin{picture}(10,15)
\put(0,10){\framebox(.3,.3)} \put(0,10.5){900}
\put(4,7.8){\framebox(.3,.3)} \put(3.8,8.3){779.87}
\put(4,3.8){\framebox(.3,.3)} \put(3.8,4.3){1469.67}
\put(4,.8){\framebox(.3,.3)} \put(3.8,1.3){1650}

\put(2,4){\circle{.3}} \put(1.6,3.5){1005.55}
\put(2,14.7){\circle{.3}} \put(1.8,15.2){900}
\put(6,9){\circle{.3}} \put(5.8,9.5){779.87}
\put(6,5){\circle{.3}}\put(5.8,5.5){1469.67}
\put(6,2){\circle{.3}}\put(5.8,2.5){2650}

\put(6,0){1650} \put(6,3){1650} \put(6,7){1650}

\put(8,10){650} \put(8,8){2650} \put(8,6){650} \put(8,4){2650}
\put(8,3){650} \put(8,1){2650}

\put(2,10){1500} \put(4,16.7){500} \put(4,12.7){2500}

\put(.3,10.3){\line(2,5){1.6}} \put(.3,10.2){\line(1,0){1.6}}
\put(.3,10){\line(1,-3){1.8}} \put(2.2,14.9){\line(1,1){1.6}}
\put(2.2,14.7){\line(1,-1){1.6}}

\put(2.3,4.1){\line(1,2){1.7}} \put(2.3,4){\line(1,0){1.7}}
\put(2.3,3.9){\line(1,-2){1.6}}

\put(4.3,8){\line(2,1){1.6}} \put(4.3,8){\line(2,-1){1.6}}
\put(4.3,4){\line(2,1){1.6}} \put(4.3,4){\line(2,-1){1.6}}
\put(4.3,1){\line(2,1){1.6}} \put(4.3,1){\line(2,-1){1.6}}

\put(6.3,9){\line(2,1){1.6}} \put(6.3,9){\line(2,-1){1.6}}
\put(6.3,5){\line(2,1){1.6}} \put(6.3,5){\line(2,-1){1.6}}
\put(6.3,2){\line(2,1){1.6}} \put(6.3,2){\line(2,-1){1.6}}

\put(1.8,10.7){\line(0,-1){1}} \put(1.6,6.5){\line(0,-1){1}}
\put(5.8,7.7){\line(0,-1){1}} \put(5.8,3.8){\line(0,-1){1}}
\put(5.8,2.2){\line(0,-1){1}}

\put(.5,13){Send} \put(.5,9.5){Reprocess} \put(.5,7){Test}
\put(2.5,16){G 0.8} \put(2.5,13.5){B 0.2} \put(2.5,6.3){$T_0\
\frac{154}{225}$} \put(2.5,4.3){$T_1\ \frac{61}{225}$}
\put(2.5,1.7){$T_2\ \frac{10}{225}$}

\put(4.5,8.7){Send} \put(4.3,7.){Reprocess} \put(4.5,4.7){Send}
\put(4.3,3.){Reprocess} \put(4.5,1.5){Send} \put(4.3,0){Reprocess}

\put(6.7,9.7){G $\frac{72}{77}$} \put(6.7,8.2){B $\frac{5}{77}$}
\put(6.7,6.){G $\frac{36}{61}$} \put(6.7,4.2){B $\frac{25}{61}$}
\put(6.7,2.5){G 0} \put(6.7,1){B 1}

\end{picture}

Prior probabilities are $P(G)=0.8$ and $P(B)=0.2$. The recommended
option is to send to the next stage, without inspection. It might
be cheaper to test only one component.




\end{document}
