# Poisson Distribution - Waiting Time

> This document is written in *R*.
>
> ***GitHub***: https://github.com/czs108

## Background

> A certain call centre receives on average **5** calls per minute.

## Question A

> What is the probability of receiving **3** calls in any given minute?

\begin{equation}
\lambda = 5
\end{equation}

\begin{equation}
\begin{split}
P(X = 3) &= \frac{e^{-5} \times {5}^{3}}{3!} \\
    &= 0.1404
\end{split}
\end{equation}

Use the `dpois` function.


```R
dpois(x=3, lambda=5)
```


0.140373895814281


## Question B

> What is the probability of receiving *no* calls in **2** minutes? 

\begin{equation}
\lambda = 5 \times 2 = 10
\end{equation}

\begin{equation}
\begin{split}
P(X = 0) &= \frac{e^{-10} \times {10}^{0}}{0!} \\
    &= e^{-10}
\end{split}
\end{equation}


```R
dpois(x=0, lambda=10)
```


4.53999297624849e-05


Or use the `exp` function directly.


```R
exp(-10)
```


4.53999297624849e-05


## Question C

> What is the probability of having to wait *less* than **1** minute for a call?

\begin{equation}
\begin{split}
P(X \geq 1) &= 1 - P(X = 0) \\
    &= 1 - \frac{e^{-5} \times {5}^{0}}{0!} \\
    &= 1 - e^{-5}
\end{split}
\end{equation}


```R
1 - exp(-5)
```


0.993262053000915


## Question D

> Write down an equation for the time $t$ in which you could be **90%** certain of receiving a call.

\begin{align}
1 - P(X = 0) = 0.9 \\
P(X = 0) = 0.1
\end{align}

\begin{equation}
\lambda = 5 \cdot t
\end{equation}

\begin{equation}
\begin{split}
P(X = 0) &= \frac{e^{-\lambda} \times {\lambda}^{0}}{0!} \\
    &= e^{-\lambda} \\
    &= 0.1
\end{split}
\end{equation}

Then we get

\begin{align}
\ln 0.1 = -2.3 \\
\lambda = 2.3
\end{align}


```R
log(0.1)
```


-2.30258509299405


\begin{equation}
t = \lambda \div 5 = 0.46
\end{equation}

7677185439affac6866b106671a709f302261306
ipynb
Jupyter Notebook
exercises/Poisson Distribution - Waiting Time.ipynb
czs108/Probability-Theory-Exercises
60c6546db1e7f075b311d1e59b0afc3a13d93229
MIT
exercises/Poisson Distribution - Waiting Time.ipynb
czs108/Probability-Theory-Exercises
60c6546db1e7f075b311d1e59b0afc3a13d93229
MIT
exercises/Poisson Distribution - Waiting Time.ipynb
czs108/Probability-Theory-Exercises
60c6546db1e7f075b311d1e59b0afc3a13d93229
MIT
2022-03-21T05:04:07.000Z
2022-03-21T05:04:07.000Z
Qwen/Qwen-72B
1. YES
2. YES