% SIMIODE-TeacherStudent-Template.tex and simiode.cls for LaTeX2e
% Version 22 November 2016.
% 
% This template is to be used with the  class file "simiode.cls". 
%  
% The latest version of this class and template files 
% can be found at
% 
%       <http://www.SIMIODE.org> in the Author section.
%
% A "Quick Start Guide" appears below.
%
% This file must be processed with version LaTeX2e or higher.
% Appreciation to Mark Frantz, IUPUI; John Thoo, Yuba College; and Eric Sullivan, Carroll College.
%
\documentclass{simiode}
%
% With this version of the tex file and the associated SIMIODE.cls file you can produce BOTH a Student Version and a Teacher Version of your modeling scenario or technique narrative.
%
% Student Version contains the title STUDENT VERSION along with the NAME OF SCENARIO, with no abstract, no keywords, no tags, no author identifiers, and no COMMENTS section. The Student Version contains only the STATEMENT of the modeling scenario only with appropriate figures, data, instructions, and perhaps a bibliography appropriate for student resourcing, but nothing in the bibliography which would "give away" the nature of the modeling scenario, etc.
%
%The Teacher Version contains the material in the Student Version, namely the title NAME OF SCENARIO, now headed with   TEACHER VERSION, but also full author  identification, abstract, key words, tag words, and, following the STATEMENT, a section of COMMENTS which can be discussion of presentation  ideas, "solutions," techniques, etc.
%
% Authors can prepare a full Teacher Version using the notions immediately below  to create a pdf for review, but in review please eliminate all information about the author as we use a double-blind referee system. Such information will be restored when accepted and published in SIMIODE at www.simiode.org.
%
%***********   Toggle the following line to turn the teacher version on (1) or off (0). ***********
%
\def\TeacherEdition{0} % Toggle this line's value.
\newcommand{\teacher}[1]{\ifnum\TeacherEdition=1 #1 \fi}
%
% The \teacher{ } command wraps any text that will appear only in the teacher version of
% the document. See this file for examples. This has been done for you in the document below.   
% Rename the pdf after you compile each final version.
%
\usepackage{amsmath,amssymb,mathtools}
\usepackage{color}
\usepackage{graphicx, subfigure,enumerate}
\usepackage{hyperref}
\usepackage{url}
%
\renewcommand{\baselinestretch}{1.3}
\newcommand{\vs}{\vspace*{.2cm}}
\newcommand{\pfrac}[2]{\left(\frac{#1}{#2}\right)}
\renewcommand{\labelitemii}{$\bullet$}
%
% NOTE regarding macros %%
%
% Any macros defined for your paper should be contained in 
% the top matter. Likewise, any environment definitions such 
% as \newtheorem or \newenvironment should also go in the 
% top matter. 
% 
% Do not \input your macros as separate files within your 
% final version because more files make it harder for the 
% editors and users to keep track of and/or modify and 
% append your paper.
%
% Top matter is above and the beginning of the document below.
%
\begin{document}

\newpage
%
% You only need to change the NAME OF SCENARIO in the next line and delete the footnote. 
% See above for instructions on toggling from Teacher Version to Student Version.
%
\title{The Poisson Process and Waiting Time}





\markboth{ Poisson Process}{Poisson Process}

\author{Mehdi Hakim-Hashemi\\
Normandale Community College\\
Bloomington MN 55446 USA\\
mehdi.hashemi@normandale.edu
}

\makeStitlePDFLaTex

\
\begin{abstract}
In this project students learn to derive the probability  density function (pdf) of the Poisson distribution and the cumulative distribution (cdf)  of the waiting time.  They will use them to solve  problems in stochastic processes.
\end{abstract}



\section*{SCENARIO DESCRIPTION}
\subsection*{ Poisson Process}
Suppose you want to find the probability of $5$ costumers entering a certain bank between $9$ AM and $11$ AM. The process that addresses this problem, and similar problems, is called the  {\it Poisson process\/}. 
In this activity you will find a formula for the Poisson process by solving a system of differential equations. Let 

\[\begin{dcases} N(t)  = \ \text{number of people entering a bank in the time period $[0, t]$}\\ p_n(t) = \text{Pr}(N(t) = n) = \ \text{probability of $n$ people entering the bank in the time period $[0,t]$}\end{dcases}\]


 
Suppose we know  that   $\lambda$ people  (on average) enter the bank in the period $[0,1]$ (unit period of time). We then can make the following  reasonable assumptions:

\[\text{Pr}(N(\tau) = 1) = \lambda\cdot  \tau \ \ \ \ \text{and} \ \ \ \ \text{Pr}(N(\tau)\geq 2) = 0 \ \ \ \ \text{for a small} \ \tau\]


\noindent and the number of people arriving in any two disjoint periods of time are independent. The first two imply  assumptions that 

\[\text{Pr}(N(\tau) = 0) = 1 - \lambda\cdot \tau\, . \]



Now we have

\begin{eqnarray*}
\text{Pr}(N(t+\tau) = n+1) &=& \sum_{k = 0}^{n+1}\left( \text{Pr}(N(t) = n+1 - k)\cdot \text{Pr}(N(\tau) = k)\right)\,  ,\\
&=& \text{Pr}(N(t) = n+1)\cdot \text{Pr}(N(\tau) = 0) +\text{Pr}(N(t) = n)\cdot \text{Pr}(N(\tau) = 1)\,   ,\\
&=&\text{Pr}(N(t) = n+1)\cdot (1 - \lambda \tau) + \text{Pr}(N(t) = n)\cdot (\lambda \tau)\, 
\end{eqnarray*}
\noindent which implies that
\begin{eqnarray*}
p_{n+1}(t + \tau) &=& (1 - \lambda\cdot  \tau)\cdot p_{n+1}(t) + \lambda\cdot \tau\cdot  p_n(t)\, . \\
\end{eqnarray*}
\noindent From this it follows that,

\begin{eqnarray*}
\frac{p_{n+1}(t+\tau) - p_{n+1}(t)}{\tau} &=& -\lambda\cdot  (p_{n+1}(t) - p_n(t))\, .
\end{eqnarray*}



Now taking the limit, i.e.  letting $\tau\rightarrow 0$ we obtain,

\begin{eqnarray*}
\frac{d p_{n+1}(t)}{dt} &=& -\lambda\cdot (p_{n+1}(t) - p_n(t))\,\,\, {\rm for} \,\,  n = 0, 1, \cdots\\ 
 \frac{d p_0(t)}{dt} &=& -\lambda\cdot  p_0(t)\, .
 \end{eqnarray*}




\begin{itemize}
\item[]  {\bf Problem 1:} Solve the above system of first order differential equations. The unknowns are $p_k(t)$ for $k = 0, 1, \cdots, n+1$. 

\item[]  {\bf Problem 2:} Given that the average number of costumers entering a bank during $8$ hrs on a weekday is $128$ find the probability that the bank will have $10$ costumers ernter the bank between $9$ AM and $10$ AM (time period
$[0,1]$) on a weekday? 




\subsection*{Waiting Time}
Suppose you are observing the costumers in a bank and one costumer arrives. You want to find the probability that it takes more than certain amount of time, $t$, for the next customer to arrive. That is, you want to find
$\text{Pr}(T >t)$ where $T$ is called the {\it waiting time\/}. The longer you wait the more you expect to see a costumer. Therefore  $\text{Pr}(T <t + \tau) > \text{Pr}(T <t)$ which implies $\text{Pr}(T >t + \tau) < \text{Pr}(T >t)$ and we have,

\begin{eqnarray*}
\text{Pr}(T>t) - \text{Pr}(T>t+\tau) &=& \text{Pr}(t < T \leq t+\tau)\\
&=&  \text{Pr}(\text{one person arrives in the period $[0,\tau]$} \ \text{and} \ T>t) \\
&=&  \text{Pr}(N(\tau) = 1)\cdot  \text{Pr}(T>t)= \lambda\cdot  \tau\cdot \text{Pr}(T>t)\, .
\end{eqnarray*}



Therefore

\[\frac{\text{Pr}(T>t + \tau) - \text{Pr}(T>t)}{\tau} = -\lambda\cdot \text{Pr}(T>t)\, \]
\noindent and if we let $\tau\rightarrow 0$ then it follow that, 

$$  \frac{d\text{Pr}(T>t)}{dt} = -\lambda\cdot \text{Pr}(T>t)\, .$$  

Now consider the following problems:

\begin{itemize}
\item[] {\bf Problem 3:} Solve the differential equation for $G(t) = \text{Pr}(T>t)$ with the initial condition $f(0) = \text{Pr}(T>0) = 1$.
\item[]  {\bf Problem 4:} Find the cdf of the distribution of $T$, i.e.  $F(t) = 1 - G(t)$. 
\item[]  {\bf Problem 5:} Find the pdf of the distribution of $T$ by differentiating its cdf, i.e.   $f(t) = F'(t)$.
\item[] {\bf Problem 6:} Find the average value of $T$ or average waiting time until a customer arrives, i.e. $\displaystyle \int_0^\infty t f(t) \ dt$. 
\item[]  {\bf Problem 7:} Suppose, on average, a bank has  $5$ costumers  per hour. Use the previous problem to find the average waiting time. Does the answer make sense intuitively?
\item[]  {\bf Problem 8:}  Following problem $5$, suppose at about 9:30 AM you see one costumer, what is the probability that the next costumer arrives in the next $10$ minutes? 
\item[]  {\bf Problem 9:} If you see the first costumer at 9:05 AM what is the probability that you see the next costumer after $5$ minutes?




\end{itemize}

%\item {\bf Problem 5:} Go to a  library and count the number of people entering the library in one hour. What does the number you found represent? Use it to answer the above questions using the number you found.  
\end{itemize}

\teacher{
\section*{NOTES FOR TEACHERS}
Let  $T_k$ be the time of the $k^{\rm th}$ arrival, then intuitively 

\[\text{Pr}(T_k \leq t) = \text{Pr}(N(t)\geq k)\, .\]



So here $T = T_1$ in this case. Both $\{N_k(t)\}$ and $\{T_k\}$ are {\it Markov processes\/}. Neither is stationary, but both have stationary independent increments. There  many different ways of interpreting the Poisson distribution including defining it as a limit of binomial distribution. The above approach uses differential equations to develop both of them. See Durrett $\cite{durrett}$ for more details.

\begin{thebibliography}{99}




\bibitem{durrett} Durrett R. 2016.   {\it Essentials of Stochastic Processes $3^{\rm rd}$ ed\/}. New York: Springer.


\end{thebibliography}
}

\end{document}
