<jupyter_start><jupyter_text>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.<jupyter_code>dpois(x=3, lambda=5)<jupyter_output><empty_output><jupyter_text>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}<jupyter_code>dpois(x=0, lambda=10)<jupyter_output><empty_output><jupyter_text>Or use the `exp` function directly.<jupyter_code>exp(-10)<jupyter_output><empty_output><jupyter_text>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}<jupyter_code>1 - exp(-5)<jupyter_output><empty_output><jupyter_text>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}<jupyter_code>log(0.1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20494104435710275, 'fraction_numerical': 0.04098820887142055, 'mean_word_length': 4.94, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 29, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '520132', 'license': 'MIT', 'n_tokens_mistral': 692, 'n_tokens_neox': 646, 'n_words': 149, 'path': 'exercises/Poisson Distribution - Waiting Time.ipynb', 'repo_name': 'czs108/Probability-Theory-Exercises', 'size': '1781'}