% 4.tex Available at personal.bgsu.edu/~zirbel/592/latex/4.tex \documentclass[11pt,letterpaper]{article} % 11 point font \pagestyle{empty} % no page numbers \oddsidemargin 0in % in addition to the 1in left margin \oddsidemargin 0.25in % in addition to the 1in left margin \textwidth 6in % allows for 1in right margin \topmargin -0.3in % in addition to the 1in top margin \headheight 0in % height left for a header line \headsep 0in % distance between header and body \textheight 9.6in % extra space for text \usepackage{hyperref} % insist on letter paper \begin{document} % What came before is the 'preamble' % -------------------------- Generic newcommands ---------------------------- % I use certain commands and combinations of commands so often, I decided % to make up special short names for them. \newcommand{\be}{\begin{equation}} % begin a displayed, numbered equation \newcommand{\ee}{\end{equation}} % end a displayed, numbered equation \newcommand{\bd}{\[} % begin a displayed, unnumbered equation \newcommand{\ed}{\]} % end a displayed, unnumbered equation \newcommand{\bea}{\begin{eqnarray}} % displayed, numbered equation array \newcommand{\eea}{\end{eqnarray}} \newcommand{\bda}{\begin{eqnarray*}} % displayed, unnumbered equation array \newcommand{\eda}{\end{eqnarray*}} \newcommand{\blist}[1]{\begin{list}{{\bf \arabic{enumi}.}}{\usecounter{enumi}\setlength{\itemsep}{#1}}} % begin a numbered list. The optional % argument is the spacing between items \newcommand{\elist}{\end{list}} % end the list % -------------------------- Specific newcommands --------------------------- % In every document, certain symbols of combinations of symbols appear so % often, it saves time to define shorted commands for them. \newcommand{\Xn}{X_{n}} \renewcommand{\Xi}{X_{i}} % \Xi is normally a Greek letter \newcommand{\nsum}{\sum_{n=0}^{\infty}} % why type this 8 times? \newcommand{\isum}{\sum_{i=1}^{n}} % this appears 3 times below \newcommand{\ind}{1_{\{N=n\}}} % indicator function \newcommand{\E}{{\rm I\! E}} % fancy E for expectation \renewcommand{\P}{{\rm I\! P}} % fancy P for probability % ------------------------- Start of text ---------------------------------- % None of the above commands puts any ink on the page. That starts here. \begin{center} % begin the centering environment \mbox{{\sc Mathematics 445/545 - Applied Probability - Fall 2000 - Zirbel}}\\ {\bf Homework \#4. Due Friday, October 6.} \end{center} \blist{0.2in} \item Suppose $X_{1}, X_{2}, \ldots$ all have the same mean and take values in $[0,\infty)$. Let $N$ take values in the set $\{0, 1, 2, \ldots\}$ and suppose that $N$ is independent of $X_{i}$ for $i=1, 2, 3, \ldots.$ Define a new random variable $S$ by $S = X_{1} + \cdots + X_{N}$; when it happens that $N=0$, then we set $S=0$. The steps below show that, in this case, $\E [S] = \E [N] \E [X_{1}]$. Your job is to rewrite these steps and {\em provide justifications for each step}. The notation $\ind$ means a random variable whose value is 1 when $N=n$ and 0 otherwise. \bda \E [S] &=& \E \left[ \left( \nsum \ind \right) S \right] \\ &=& \nsum \E \left[ \ind S \right] \quad \mbox{because $\ind S \geq 0$}\\ &=& \nsum \E \left[ \ind (X_{1} + \cdots + X_{N}) \right] \\ &=& \nsum \E \left[ \ind (X_{1} + \cdots + X_{n}) \right] \\ &=& \nsum \isum \E \left[ \ind \Xi \right] \\ &=& \nsum \isum \E \left[ \ind \right] \E \left[ \Xi \right] \\ &=& \nsum \isum \P(N=n) \E \left[X_{1} \right] \\ &=& \nsum n \P(N=n) \E \left[X_{1}\right] \\ &=& \E[N] \E[X_{1}] \eda This result was used in computing the expected waiting time in our discrete time queueing model. \item For the discrete time queueing model we have been discussing in class, we found that $W = 1/(p-\lambda)$. Write a Matlab program called {\tt wait.m} which produces a graph of this relationship. Add comments to each line of the program to explain what is being done. Print out the graph and the program. Some suggested commands to use and how to get help on them: \begin{tabbing} \qquad \= {\tt lambda = 0:0.01:p;} \qquad \= help colon\\ \> {\tt W = 1./(p-lambda);} \>help slash\\ \> {\tt plot(lambda,W);} \>help plot\\ \> {\tt hold on} \>help hold \end{tabbing} You should change the horizontal axis to display values out to $\lambda = 1$ using {\tt axis}. Add a vertical dashed line at $p$ using a command similar to {\tt plot([p p], [0 10], '-');}. Add labels to the axes and a title for the graph. \elist % end the list \vfill % pad the rest of the page with white space \end{document} % end of the document