Probability and pedestrian wait time density function

Click For Summary
In a Poisson arrival process, pedestrians arrive at a crossing with a rate of λ arrivals per minute, and the first pedestrian starts a timer T, allowing others to cross if they arrive within T. The probability that a randomly arriving pedestrian crosses in a group of k+1 pedestrians is given by the formula (K+1)(λT)^k e^(-λT) / (k!(1+λT)). The discussion emphasizes the need to consider two cases: when the pedestrian arrives first and when someone else arrives first. The application of the law of large numbers is suggested to simplify the calculations related to these probabilities. The final probability expression incorporates both scenarios to determine the likelihood of crossing in a group of k+1 pedestrians.
  • #31
Ray Vickson said:
The solution given by the OP (with help from tnich) is the type of thing I would have hoped to get from my students (or at least, the "A" students) on an assignment or take-home final. Basically, it is a renewal problem or a somewhat weird queueing problem, wherein a customer arriving to an empty queue opens a "gate" that stays open for time T and admits subsequent arrivals. The gate closes at time T, and the waiting customers immediately exit the system. This setup satisfies the requirements of PASTA ("Poisson Arrivals see Time Averages"), so in the long run an arriving customer sees what an average customer sees. That gives a nice "equilibrium" analysis that really emphasizes the system behavior, without the need for a Bayesian interpretation.

It's probably just pattern recognition that led me down this road...

My read on the problem is, roughly, that you have exponential random variables ##Y_i## with parameter ##\lambda## and Poisson random variables ##X_i## with parameters ##t, \lambda##. If you run it forward you have a renewal process that goes

##X_1, Y_1, X_2, Y_2, ... ##

or equivalently ##X_i, Y_i, \to \text{renew}##

If you look at this as a process that counts time, you have

##\text{deterministic \{time = t }\}, Y_i \to \text{renew}##

however if you're interested in counting people, it reads

##X_i, \text{deterministic \{person = 1 }\} \to \text{renew}##

There are really two distinct dimensions embedded in here, and what is amusing is how depending on which feature you focus on, the other random variable becomes deterministic. For some reason, I honed in on the second case, but I recognize that typical renewal problems really are time denominated.

My approach should correspond to 'people averaging' whereas I infer that tnich took the first one of time averaging. I find it even more amusing that the two approaches give the same result.
 
Physics news on Phys.org
  • #32
StoneTemplePython said:
It's probably just pattern recognition that led me down this road...

My read on the problem is, roughly, that you have exponential random variables ##Y_i## with parameter ##\lambda## and Poisson random variables ##X_i## with parameters ##t, \lambda##. If you run it forward you have a renewal process that goes

##X_1, Y_1, X_2, Y_2, ... ##

or equivalently ##X_i, Y_i, \to \text{renew}##

If you look at this as a process that counts time, you have

##\text{deterministic \{time = t }\}, Y_i \to \text{renew}##

however if you're interested in counting people, it reads

##X_i, \text{deterministic \{person = 1 }\} \to \text{renew}##

There are really two distinct dimensions embedded in here, and what is amusing is how depending on which feature you focus on, the other random variable becomes deterministic. For some reason, I honed in on the second case, but I recognize that typical renewal problems really are time denominated.

My approach should correspond to 'people averaging' whereas I infer that tnich took the first one of time averaging. I find it even more amusing that the two approaches give the same result.
But do they give the same result? I don't see that we have converged on the same result, yet.
 
  • #33
tnich said:
But do they give the same result? I don't see that we have converged on the same result, yet.

They do give the same results -- I just need to not be lazy, and allow the plus one adjustment.

Mehmood_Yasir said:
What is the probability that a randomly arriving padestrian has crossed the crossing in a group of ##k+1## padestrians...

The answer given is ##\frac{(K+1) {(\lambda * T)}^k e^{-\lambda T} } {k! (1+\lambda T)}##

##= \frac{(K+1)}{(1+\lambda T)} \frac{(\lambda T)^k e^{-\lambda T} }{k! } = \frac{(k+1)}{(1+\lambda t)} \Big(\frac{(\lambda t)^k e^{-\lambda t} }{k! }\Big) = \frac{(k+1)}{(1+\lambda t)} p_{\lambda}(k=k, t)##

(with a slight notation change along the way there)
- - - -
so the focus is on recovering ##\frac{(k+1)}{(1+\lambda t)} p_{\lambda}(k=k, t)## as the probability for a group size of ##k + 1##. Let's re-run my people oriented approach and include the plus one increment this time around.
- - - -
##\text{prior} =
\begin{bmatrix}
\text{P group size is 1}\\
\text{P group size is 2}\\
\text{P group size is 3}\\
\vdots\\
\text{P group size is k+1}\\
\vdots\\
\end{bmatrix}
=\begin{bmatrix}
p_{\lambda}(k=0, t)\\
p_{\lambda}(k=1, t)\\
p_{\lambda}(k=2, t)\\
\vdots\\
p_{\lambda}(k=k, t)\\
\vdots\\
\end{bmatrix}##

The justification is that you have a Poisson process -- except it is shifted by +1 via the deterministic random variable (##Y_i##) that must have a payoff of 1 person (and for avoidance of doubt remember that if we're interested in time, ##Y_i## has a finite first moment with respect to time).

Notice in particular that the prior probability associated with group size of ##(k+1)## is ##p_{\lambda}(k=k, t)##
- - - -

Now the new likelihood function looks a lot like the old one

##
\text{likelihood function} =
\begin{bmatrix}
1\\
2\\
3\\
\vdots\\
k+1\\
\vdots\\
\end{bmatrix}=
\begin{bmatrix}
0\\
1\\
2\\
\vdots\\
k\\
\vdots\\
\end{bmatrix} +
\begin{bmatrix}
1\\
1\\
1\\
\vdots\\
1\\
\vdots\\
\end{bmatrix}
##

and we now have

##\text{posterior} \propto \text{likelihood function} \circ \text{prior} = \begin{bmatrix}
(1)p_{\lambda}(k=0, t)\\
(2)p_{\lambda}(k=1, t)\\
(3)p_{\lambda}(k=2, t)\\
\vdots\\
(k+1)p_{\lambda}(k=k, t)\\
\vdots\\
\end{bmatrix}
= \begin{bmatrix}
(0)p_{\lambda}(k=0, t)\\
(1)p_{\lambda}(k=1, t)\\
(2)p_{\lambda}(k=2, t)\\
\vdots\\
(k)p_{\lambda}(k=k, t)\\
\vdots\\
\end{bmatrix} +
\begin{bmatrix}
(1)p_{\lambda}(k=0, t)\\
(1)p_{\lambda}(k=1, t)\\
(1)p_{\lambda}(k=2, t)\\
\vdots\\
(1)p_{\lambda}(k=k, t)\\
\vdots\\
\end{bmatrix}
##

Everything is real, non-negative so we can split the summation when looking for our normalizing constant --and we have the underlying power series of the exponential function, ensuring absolute convergence -- so we get a sum equal to
##\big(\lambda t \big) + \big(1\big) = \big(\lambda t + 1\big)##

-- i.e. when splitting the summation, we immediately recognize the expected value of the Poisson distribution and that the probabilities of a Poisson sum to one.

Putting this all together, we get:

##
\text{posterior} =
\begin{bmatrix}
\text{P group size is 1}\\
\text{P group size is 2}\\
\text{P group size is 3}\\
\vdots\\
\text{P group size is k+1}\\
\vdots\\
\end{bmatrix}
= \begin{bmatrix}
\frac{1}{\lambda t + 1} p_{\lambda}(k=0, t)\\
\frac{2}{\lambda t + 1}p_{\lambda}(k=1, t)\\
\frac{3}{\lambda t + 1}p_{\lambda}(k=2, t)\\
\vdots\\
\frac{k+1}{\lambda t+1}p_{\lambda}(k=k, t)\\
\vdots\\
\end{bmatrix}##
- - - -
in particular notice

##\text{P group size is k+1} = \frac{k+1}{\lambda t+1}p_{\lambda}(k=k, t)##

which is the result we were targeting.

- - - - -
edit:
a much later thought that can streamline a lot of this and put things in standard language:

the problem can be addressed, succinctly, as a renewal rewards process. Treating people in an arrival epoch as a discrete time random variable ##X##, we can see that ##X = W + 1##, where ##W## is poisson with parameter ##\lambda## and time ##t##. The process probabilistically starts over immediately after each arrival epoch

For rewards, we set up a reward of ##1## per person if they are in an arrival epoch with ##k+1## people and zero otherwise. Equivalently, we define the event ##A_n## where there are ##k+1## people in the nth arrival epoch and of course have an associated indicator random variable ##\mathbb I_{A_n}##, and the reward for epoch ##n## is given by ##R_n := \mathbb I_{A_n}\cdot X_n##

So we compute
##E\big[X_1\big] = E\big[W_1 \big] + 1 = \lambda t + 1##
##E\big[R_1\big] = E\big[\mathbb I_{A_1}\cdot X_1\big] = p_\lambda(k=k, t) \cdot (k+1) ##

but the basic renewal rewards theorems tell us

##\lim_{t \to \infty } \frac{r(t)}{t} = \frac{E[R_1]}{E[X_1]} = \frac{(k+1) \cdot p_\lambda(k=k, t)}{\lambda t + 1}=\lim_{t \to \infty } \frac{E[r(t)]}{t} ##

which is the answer
 
Last edited:
  • Like
Likes Mehmood_Yasir

Similar threads

Replies
56
Views
5K
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 5 ·
Replies
5
Views
873
  • · Replies 10 ·
Replies
10
Views
2K
Replies
2
Views
2K
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K