0
1.6kviews
The number of customers arriving at Costa Coffee is Poisson distributed with mean 4. Generate Poisson variate. Use random numbers 0.5389, 0.0532, 0.3492 in sequence.
1 Answer
0
5views

Given mean $\lambda = 4$, $R_1 = 0.5389$, $R_2 = 0.0532$, $R_3 = 0.3492$

Iteration 1:

  1. Set $x=0$ and $P = 1$

  2. Generate a random number $R_1 \sim \cup (0,1)$

    $\begin{aligned} \text { compure } P \cdot R_{1} & \Rightarrow 1(0.5389) \\ &=0.5389 \end{aligned}$

    Set $P=p \cdot R_{1}=0.5389$

  3. check $P \lt e^{-\lambda}$

    i.e. $0.5389 \lt e^{-4}$

    i.e. $0.5389 \lt 0.0183, \text{ false } \Rightarrow \text{reject x and} $

    set $x=x+1=0+1,$ go to step 2

Iteration 2:

  1. Generate a random number $R_2 \sim \cup (0,1)$

    $\begin{aligned} \text { Compute } P \cdot R_{2} & \Rightarrow(0.5389) - (0.0532) \\ &=0.0286 \end{aligned}$

  2. Check $P \lt e^{-\lambda}$

    i.e, $0.0286 \lt e^{-4}$

    $0.0286 \lt 0.0183, false \Rightarrow \text{reject x and}$

    set $x=x+1=1+1=2$ go to step 2

Iteration 3:

  1. Generate a random number $R_3 \sim \cup (0,1)$

    $\begin{aligned} \text { Compute } P \cdot R_{3} & \Rightarrow(0.0286) - (0.3492) \\ &=0.0099\end{aligned}$

  2. Check $P \lt e^{-4}$

    i.e, $0.0099 \lt e^{-4}$

    $0.0099 \lt 0.0183, true \Rightarrow \text{ accept } x - 2$

The whole process is summarized in table below:

X P $R_{x+1}$ Accept / Reject Result
0 0.5389 0.5389 $P \gt e^{-\lambda} \Rightarrow Reject$ -
1 0.0532 0.0286 $P \gt e^{-\lambda} \Rightarrow Reject$ -
2 0.3492 0.0099 $P \gt e^{-\lambda} \Rightarrow Accept$ X = 2

Table: Acceptance - Rejection process for Poisson variable

Please log in to add an answer.