\documentclass{article}
\input{18440-preamble}

\begin{document}
\pset{}{Dan Ports}{2003/10/6}{drkp@mit.edu}

\begin{ppart}{Problem 1}
\paragraph{Part a}
Consider a purchaser who buys transistors that have a probability of failure $.1$ in lots of 20, inspects four transistors at random, and rejects the lot if any of the four is defective. Since the transistors are chosen independently and at random, the probability that any one will work is $.9$ and the probability that all four will work is $.9^4 = .6561$. This is the proportion of lots accepted.
\paragraph{Part b}
An accepted lot contains four transistors that are known not to be defective (the ones that were inspected). Of the other 16, each transistor will be independently defective with probability $.1$. The expected number of defective transistors is $(16)(.1)=1.6$. So the expected number of working transistors per lot is $4+16-1.6 = 18.4$.
\paragraph{Part c}
If a lot is not accepted, no transistors are acquired. So the expected number of transistors acquired per lot inspected is the probability of a lot being inspected multiplied by the expected number of working transistors per lot:
$(18.4)*.6561 = 12.072$.
\paragraph{Part d}
There is a $.6561$ probability that the lot will be accepted, incurring a cost of \$10.50, and a $1-.6561=.3439$ probability that the lot will be rejected, costing \$0.50. So the expected cost per lot is $(.6561)(10.5)+(.3439)(0.5) = \$7.061$.
\paragraph{Part e}
The expected number of working transistors acquired per purchase is $12.072$ and the expected cost per purchase is \$7.061. So the expected cost per working transistor is $\frac{7.061}{12.072} = \$0.59$.
\paragraph{Part f}
If all lots are accepted, the expected cost per lot will be \$10 (no inspections are required). The expected number of working transistors per lot will be $(20)(0.9) = 18$ since the transistors fail independently with probability $.1$. So the expected cost per transistor will be $\frac{10}{18} = \$0.56$. This is less than the expected cost with inspections. But this does not take into account whatever costs may be incurred by accepting failed transistors (debugging, replacement, etc). Also, if the probability of each transistor in a lot working is not independent (there are some bad lots that contain more failed transistors than usual), then inspections become more advantageous.
\end{ppart}

\begin{ppart}{Problem 2}
\paragraph{}
Consider the problem of simulataneously tossing $n$ coins with heads probability $p$ until at least one head appears, where $n$ is large and $p$ is small, and define $\lambda = np$. Let $X$ be the number of heads that appear. Let $Y$ be a Poisson random variable with parameter $\lambda$.
\paragraph{}
The approximation $\Pr{X=1} \approx P{Y=1} = \lambda e^{-\lambda}$ does not take into account the fact that the coins are re-flipped if no heads appear. So it is not a very good approximation. However, it may be useful if $\lambda$ is large enough that the probability of zero heads in a flip is $e^{\lambda} \approx 0$.
\paragraph{}

The approximation $\Pr{X=1} \approx \Pr{Y=1|Y>0} = \frac{\lambda e^{-\lambda}}{1-e^{-\lambda}}$ is a correct approximation, because the total number of heads that occur is approximately the Poisson random variable $Y$, and we only stop if $Y$ is non-zero.
\paragraph{}
The approximation $\Pr{X=1} \approx \Pr{Y=0} = e^{-\lambda}$ is not valid. It is correct that at least one coin will come up heads, so $X$ will equal 1 if none of the other coins come up heads. But the assumption cannot be made that the number of heads resulting from these other flips is approximately Poisson with mean $\lambda$. 
\end{ppart}

\begin{ppart}{Problem 3}
\paragraph{Part a}
Let $Y$ be a discrete random variable with expectation 0 and variance 1, and call its values $a_i$ and the corresponding probabilities $p_i$. We show by contradiction that $\Pr{Y \ge 10} \le \frac{1}{100}$. Assume the opposite. Then $\Pr{Y \ge 10} > \frac{1}{100}$, or equivalently $\sum_{\{a_i \ge 10\}} p_i > \frac{1}{100}$. Then the variance of $Y$ is $\sum_i a^2_i p_i$, which is clearly greater than the sum over a subset $\sum_{\{a_i \ge 10\}} a^2_i p_i$. But on this subset, $a_i \ge 10$, so $a_i^2 \ge 100$. Thus Var $Y \ge 100 \sum_{\{a_i \ge 10\}} p_i > 100 \frac{1}{100} = 1$ by our previous assumption. Thus the variance is greater than one. This contradicts our assumption, so 
$\Pr{Y \ge 10} \le \frac{1}{100}$.
\paragraph{Part b}
Consider the problem of tossing a fair coin $n$ times, and let $X$ be the number of heads. We show that $\Pr{X-\frac{n}{2} \ge 5\sqrt{n}} \le \frac{1}{100}$. Note that E[$X$] = $np$ = $\frac{n}{2}$ and Var $X = npq = \frac{n}{4}$.  Let $Y = \frac{X-\frac{n}{2}}{\frac{\sqrt{n}}{2}}$. Then 
\[\E{Y} = \E{\frac{X-\frac{n}{2}}{\frac{\sqrt{n}}{2}}}  \frac{\E{X}-\frac{n}{2}}{\frac{\sqrt{n}}{2}} = 0\]
And 
\[\Var Y = \Var \frac{X-\frac{n}{2}}{\frac{\sqrt{n}}{2}} = \frac{\Var X}{\left(\frac{\sqrt{n}}{2}\right)^2} = \frac{\frac{n}{4}}{\frac{n}{4}} = 1\]
applying the properties of the variance. So $Y$ is a random variable with expectation 0 and variance 1, and by part A, $\Pr{Y \ge 10} \le \frac{1}{100}$. Thus $\Pr{\frac{X-\frac{n}{2}}{\frac{\sqrt{n}}{2}} \ge 10} \le \frac{1}{100}$ or equivalently  \[\Pr{X-\frac{n}{2}
 \ge \frac{5}{\sqrt{2}}} \le \frac{1}{100}\].
\end{ppart}

\begin{ppart}{Problem 4}
\paragraph{}
Let $X$ be a binomial random variable with parameters $n$ and $p$. We consider $\Pr{X=k}$. This is $\binom{n}{k} p^k(1-p)^{n-k}$. Clearly if $k=0$, this is maximized by $p=0$, and similarly if $k=n$, $p=1$. In all other cases, the global maximum of this function is the local maximum obtained where the derivative with respect to p is zero:
\begin{eqnarray*}
\binom{n}{k}\left(\frac{k}{p}-\frac{n-k}{1-p}\right)p^k\left(1-p\right)^{n-k} &=& 0 \\
\frac{k}{p}&=&\frac{n-k}{1-p} \\
k-pk &=& np - kp \\
p = \frac{k}{n}
\end{eqnarray*}
So the probability $\Pr{X=k}$ is maximized if $p = \frac{k}{n}$.
\end{ppart}



\end{document}
