Consider worker W
. Each time a task enters the system, there is a 1/Z
chance that W
grabs the task. A total of Y
tasks enter the system.
Y
tasks, each grabbed with probability 1/Z
: the number of grabbed tasks, G_W
, is a random variable with a binomial distribution.
The probability worker W
has reached the X
threshold after Y
tasks is P(G_W >= X)
.
You can easily approximate the distribution and this probability by using a normal distribution with mean Y/Z
and variance Y(Z-1)/Z^2
. Then you can use a function that evaluates a normal distribution's cumulative distribution, which is available in mostly every programming language.