% LaTex2e
\documentclass[12pt]{article}
\usepackage{amssymb,latexsym}

%%%%%%% \usepackage{anysize}
%\marginsize{left}{right}{top}{bottom}
%\marginsize{1.25cm}{1.25cm}{1.75cm}{2.5cm} % this cuts off page numbers
%%%%%% \marginsize{2cm}{2cm}{1cm}{3cm}

\pagestyle{myheadings}
\def\header{{\hfill Exam 2 \hfill A. Miller \hfill Fall 2008
                                       \hfill Math 210\hfill}}
\markboth\header\header

\newcount\probno
\newcount\total
\newwrite\examTBLFile

\probno=0

\def\prob(#1)(#2){\advance\probno by 1 \par  \bigskip  \vfill \newpage
    \noindent\the\probno . (#1 pts)\advance\total by #1
    \immediate\write\examTBLFile{\the\probno
       \string& #1 \string&
       \string\qquad \string\\ \string\hline}}


%  \def\prob(#1)(#2){\advance\probno by 1 \par  \bigskip  (#2)  % \vfill \newpage
%      \noindent\the\probno . (#1 pts)\advance\total by #1
%      \immediate\write\examTBLFile{\the\probno
%         \string& #1 \string&
%  
%         \string\qquad \string\\ \string\hline}}
%  



\def\finishtbl{
    \immediate\write\examTBLFile{Total \string& \the\total
    \string& \qquad \string\\ \string\hline}
     }

\newwrite\ans
\immediate\openout\ans=answers
\outer\def\answer{\par\medbreak
  \immediate\write\ans{}
  \immediate\write\ans{\string\bigskip \the\probno . }
  \copytoblankline}
\outer\def\answerx{\par\medbreak
  \immediate\write\ans{}
  \immediate\write\ans{\string\bigskip \the\probno . }
  \copytoblankline}
\outer\def\putanswer{\par\medbreak
  \immediate\write\ans{}
  \copytoblankline}
\def\copytoblankline{\begingroup\setupcopy\copyans}
\def\setupcopy{\def\do##1{\catcode`##1=12}\dospecials
     \catcode`\|=12\obeylines}
{\obeylines \gdef\copyans#1
  {\def\next{#1}%
  \ifx\next\empty\let\next=\endgroup%
  \else\immediate\write\ans{\next}\let\next=\copyans\fi\next}}
\def\printanswers{\newpage\begin{center} Answers \end{center}
    \immediate\closeout\ans\input answers}

% \def\answer{\par\bigskip\bigskip\bigskip\noindent Answer: \par}
% \outer\def\answer{ {\par\bigskip Circle your answer.} \par\medbreak

\newenvironment{enum}
{\begin{list}{(\alph{enumi})}
{\usecounter{enumi}\setlength{\rightmargin}{\leftmargin}}}
{\end{list}}

\newenvironment{Enum}
{\begin{list}{(\Alph{enumi})}
{\usecounter{enumi}\setlength{\rightmargin}{\leftmargin}}}
{\end{list}}

\def\pr{\prime}
\def\vs{\vspace{1in}}

\begin{document}

\bigskip

No notes, no books, no calculators, no cell phones, no pagers, no
electronic devices of any kind.


\par\vskip .25in
\begin{center}
Name\makebox[3in]{\hrulefill} \\
\end{center}

\bigskip
Circle your TAs name:

\bigskip

\hfill Song Sun \hfill
(Boyd) Chalermpong Worawannotai \hfill

\bigskip
Hand in your exam to your TA.

\bigskip
\begin{center} \Large
 \begin{tabular}{||c|c|c||} \hline\hline
  Problem & Points & Score \\  \hline\hline
   \input{exam.tbl}
  \hline \hline
 \end{tabular}
\end{center}

\immediate\openout\examTBLFile=exam.tbl

\bigskip

Solutions will be posted shortly after the exam:

www.math.wisc.edu/$\sim$miller/m210

\setcounter{page}{0}
\newpage

\prob(10)(4.2- ?)
A random variable $X$ has the following probability density
function:

\bigskip
$$
\begin{tabular}{|c|c|}\hline
k & Pr[X=k]\\ \hline
1 & .1 \\
2 & .2 \\
3 & .7 \\
\hline
\end{tabular}
$$

\bigskip
Find the expected value of $X$,  $\mu=E(X)$.


\answer $\mu=2.6$

\prob(10)(4.1-11)
You have one card marked 5, two cards marked 10, and one card
marked 15.  Two cards are chosen randomly and simultaneously and
their numbers are noted.  A random variable $X$ is
defined to be the sum of the numbers on the cards.

\bigskip

What are the possible values of $X$? ( Do not repeat values. )

\vspace{2in}

Find the density function of $X$.

\answer \bigskip
$$
\begin{tabular}{|c|c|}\hline
k & Pr[X=k]\\ \hline
15 & 1/3 \\
20 & 1/3 \\
25 & 1/3 \\
\hline
\end{tabular}
$$

\prob(10)(4.2-29)
A Bernoulli process consists of 100 trials with the probability of
success on each trial of $p=.2$.  A random variable $X$ consists
of the number of successes in the 100 trials.

\bigskip\bigskip

What is the expected value of $X$?


\vspace{2in}

What is the standard deviation of $X$?

\prob(10)(5.2- 9)
Solve the system and graph the two lines:
$$  x + 4y =20$$
$$ 3x + 2y =30$$

\answer $(8,3)$ plus a graph which shows the lines and
some of the intercepts.

\prob(10)(7.2-17)
Let $F$ be the set of all points $(x,y)$ which
satisfy all of the three inequalities:

\begin{eqnarray*}
x+y & \geq & 6\\
y & \leq & x-4\\
y     & \geq  & 0
\end{eqnarray*}

Graph the set $F$,  shade it,
and find the coordinates of its corner points.

\answer The region is infinite with corner points $(5,1)$ and $(6,0)$.

\prob(10)(5.3-9)
For the following system of equations:

$$3x-y+6z= 19$$
$$ x+y+2z= 9$$

\bigskip

(a) find the augmented matrix of the system;

\vfill

(b) show that $x=1$, $y=2$, $z=3$ is a solution of the system;

\vfill

(c) show that there are no solutions with $y=0$.

\vfill
\answer (a) 
$$\left[
\begin{array}{rrrr}
3 & -1 & 6 & 19 \\
1 & 1 &  2 & 9 \\
\end{array}\right]$$
\par (b) $ 3(1)-(2)+6(3)= 19$ and $ (1)+(2)+2(3)= 9$ 
\par
(c) Putting $y=0$ means that $x$ and $z$ must satisfy 
   $$3x+6z= 19$$
   $$ x+2z= 9$$
But adding $(-3)$ times the second equation to the first, gives
us the equation $0=-8$ which has no solutions.  


\prob(10)(6.1-27)
Let
$$P=\left[
\begin{array}{rrr}
0 & 1 & -1 \\
1 & -1 & 0 \\
-1 & 0 & 0\\
\end{array}\right]$$

\bigskip

(a) Find $P^2$ 

\vfill

(b) Find  $P^4$

\vfill

\answer (a) $$P^2=
\left[
\begin{array}{rrr}
2 & -1 & 0 \\
1 & 2 & -1 \\
0 & -1 & 1\\
\end{array}\right]$$
\par (b)
$$P^4=P^2P^2=
\left[
\begin{array}{rrr}
5 & -4 & 1 \\
-4 & 6 & -3 \\
1 & -3 & 2\\
\end{array}\right]$$



\prob(10)(6.2-in class)
Find the inverse (if it exists) of the matrix $A$:
$$A=\left[
\begin{array}{rrrr}
 1  & 0 & 0  &  1\\
-1  & 1 & 0  &  0\\
 1  & 0 & 1  & -1\\
 0  & 0 & 0  &  1\\
\end{array}\right]$$

\answer $A^{-1}=$
$$\left[
\begin{array}{rrrr}
 1  & 0 & 0  &  -1\\
 1  & 1 & 0  &  -1\\
-1  & 0 & 1  &   2\\
 0  & 0 & 0  &  1\\
\end{array}\right]$$

\prob(10)(7.1-21)
The Bait Shop sells three kinds of bait packages, Type A,
Type B, and Type C packages.  The packages
contain worms, minnows, and grasshoppers in the amounts shown
in the following table.

\bigskip\bigskip
\begin{tabular}{|c|c|c|c|}
\hline
Type & Worms & Minnows & Grasshoppers \\
\hline\hline
A & 25 & 10 & 10 \\
B & 15 &  5 & 15 \\
C & 10 & 10 & 25  \\
\hline
\end{tabular}

\bigskip\bigskip
The profit (per package) is 2 dollar for type A
packages, 3 dollar for type B,
and 5 dollars for type C.  There are 500 worms, 400 minnows, and 600
grasshoppers available.  How many packages of each type should be
made to maximize profit?


Formulate this linear maximization problem but do 
{\bf not} solve it. Identify

(a) the variables (what does each stand for),

(b) the function to be maximized, and

(c) the constraints.

\answer (a) $x$ is the number of packages of type A to be made.
 $y$ is the number of packages of type B to be made.
 $z$ is the number of packages of type C to be made.
\par (b) Maximize the profit $P=2x+3y+5z$
\par (c) Subject to the constraints:
\par $x\geq 0$
\par $y\geq 0$ 
\par $z\geq 0$
\par $25x+15y+10z\leq 500$
\par $15x+ 5y+15z\leq 400$
\par $10x+10y+25z\leq 600$



\prob(10)(7.3- 7)

Let $F$ be the set of points  $(x,y)$ satisfying all of the inequalities:
\begin{eqnarray*}
x   & \geq  & 1 \\
y   & \geq  & 1 \\
x   & \leq  & 5 \\
y   & \leq  & 5 \\
x+y & \leq  & 8 
\end{eqnarray*}

\bigskip

(a) Find the minimum value of $z=2x+y$ in the set $F$.

\bigskip

(b) Find the maximum value of $z=2x+y$ in the set $F$.

\answer (a) minimum value of $z$ is 3 at the point $(1,1)$.
\par
(a) maximum value of $z$ is 13 at the point $(5,3)$.


 \printanswers

\finishtbl

\end{document}



