How likely are two events to occur at the same time?

1.6k Views Asked by At

Let's think of two events $1$ and $2$.

Both events happen randomly $n_1$/$n_2$-times during a given time $T$ and last for a time of $t_1$/$t_2$.

What is probability $P$, that both events happen simultaneously at some moment?



EXAMPLE 1:

$T = 60$ min

Event $1$ - looking out of the office window: $n_1 = 8$ and $t_1 = 1$ min

Event $2$ - a green car is on the street visible: $n_2 = 20$ and $t_2 = 0.5$ min

$P$: How likely do I see a green car during these $60$ min?

2

There are 2 best solutions below

16
On BEST ANSWER

Consider the discrete version of this problem, where $T$, $t_1, t_2$ are integers under some fixed unit of time and the events always start at integer multiples of time.

Then you are selecting $n_1$ values $\{a_i\}$ from $0,...,T-t_1+1$ so that each adjacent pair differs by at least $t_1$, and $n_2$ values f$\{b_j\}$ from $0,\dots T-t_2+1$ with adjacent pairs differing by at least $t_2$. You can count these with a stars-and-bars argument get you something like:

$$\binom{T-(t_1-1)n_1}{n_1}$$

The number of ways that they don't overlap can be written as the number of ways of ordering the $n_1+n_2$ blocks of type $1$ and $2$, and then inserting gaps before and after them totaling $A=T-n_1t_1-n_2t_2$. The number of orderings is $\binom{n_1+n_2}{n_1}$. A stars-and-bars argument means we can think of this as selecting $n_1+n_2$ elements from $A+n_1+n_2=T-n_1(t_1-1)-n_2(t_2-1)$ different locations. This totals $$\binom{n_1+n_2}{n_1}\binom{T-n_1(t_1-1)-n_2(t_2-1)}{n_1+n_2}$$

So the probability they don't overlap is:

$$p(t_1,t_2,T,n_1,n_2)=\frac {\binom{n_1+n_2}{n_1}\binom{T-n_1(t_1-1)-n_2(t_2-1)}{n_1+n_2}}{\binom{T-(t_1-1)n_1}{n_1}\binom{T-(t_2-1)n_2}{n_2}}$$

Expanding and canceling, we get:

$$p(t_1,t_2,T,n_1,n_2)=\frac{(T-n_1(t_1-1)-n_2(t_2-1))!(T-t_1n_1)!(T-t_2n_2)!}{(T-n_1t_1-n_2t_2)!(T-n_1(t_1-1))!(T-n_2(t_2-1))!}$$

Letting $A_i=T-n_it_i$, and $A=T-n_1t_1-n_2T_2$ we get:

$$p(t_1,t_2,T,n_1,n_2)=\frac{(A+n_1+n_2)!A_1!A_2!}{A!(A_1+n_1)!(A_2+n_2)!}$$ For continuous $t_1,t_2,T$, you'll need a limit of the above expression.

$$\lim_{M\to\infty} p(\lfloor Mt_1\rfloor,\lfloor Mt_2\rfloor, \lfloor MT\rfloor,n_1,n_2)$$

Which will give you the probability they do not overlap.

Using the following result, which is easy to prove directly:

For fixed $m$, $$\lim_{B\to\infty}\frac{(B+m)!}{B!B^m}=1$$

we get that this is the same as:

$$\begin{align}\lim_{M\to\infty} \frac{(AM)^{n_1+n_2}}{(A_1M)^{n_1}(A_2M)^{n_2}}&=\frac{A^{n_1+n_2}}{A_1^{n_1}A_2^{n_2}}\\ &=\frac{(T-n_1t_1-n_2t_2)^{n_1+n_2}}{(T-n_1t_1)^{n_1}(T-n_2t_2)^{n_2}} \end{align}$$

as the probability that the two events won't occur at the same time.

When $n_1=n_2=1$, this agrees with a more direct calculation of $\frac{(T-t_1-t_2)^2}{(T-t_1)(T-t_2)}$.

In your first case, $T=60, t_1=1, n_1=8, t_2=\frac{1}{2}, n_2=20$ you get $A=42, A_1=52, A_2=50$ and the probability is:

$$1-\frac{42^{28}}{52^{8}50^{20}}\approx 0.99446$$

0
On

[Not an answer, but some pointers]

In statistical physics parlance, you have a pair of independent 1D hard-rods (or Tonk gas). In the limit $L\to \infty$ the "canonical ensemble" (fixed volumen and number of particles) can be replaced by other ensembles, for example, a grand-canonical in which the number of particles is variable (only the average is prescribed). I turn, this ensemble (en 1D only) is equivalent to a causal stochastic process, or a point process. This can be useful, no only for theoretical analysis but also for simulation [*].

Specifically, the distance among particles in our model, in which we prescribe a "density" $\rho = \overline n/L$ and a particle "diameter" $d$, would follow a density

$$f_X(x)=\lambda e^{-\lambda(x-d)} u(x-d)$$

where $u(\cdot)$ is the unit step function and $\lambda$ is given by $E(X)=d+\lambda^{-1}=1/\rho$ or

$$ \lambda=\frac{\rho}{1-\rho d}$$

To estimate $P_o=$ probability of "overlap" (there exist particles of both different point processses separated by less than $d^*=(d_1+d_2)/2$) I can think of two approaches:

First, compute $P_1=$ probability that a single point of the process 1 overlaps with some point of process 2, and then set $P_o=1-(1-P_1)^{n_1}$ . This would amount to assume that the events "first particle of process 1 overlaps with process 2" and "second particle of process 1 overlaps with process 2" are independent, which only could work as an approximation. $P_1$ should be computable from the theory of point processes, I think.

Alternatively, perhaps it's possible to build a "marked" point process that is equivalent to the pair of processes...

[*] You can play here https://jsfiddle.net/vdo1boue/